Skip to content

Commit

Permalink
HPCC-27051 Create a Sasha service to clean up post-mortem files
Browse files Browse the repository at this point in the history
WIP

Signed-off-by: Dave Streeter <dave.streeter@lexisnexisrisk.com>
  • Loading branch information
streeterd committed Mar 4, 2025
1 parent b6b96e6 commit b58cb35
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions dali/sasha/sadbghk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,24 @@ class CSashaDebugHousekeepingServer : public ISashaServer, public Thread
PROGLOG(LOGDBGHK "Started");
unsigned defaultExpireDays = props->getPropInt("@expiryDefault", DEFAULT_EXPIRYDAYS);

Owned<IPropertyTree> globals;
StringBuffer dir;
if (!getConfigurationDirectory(globals->queryPropTree("Directories"), "debug", "thor", globals->queryProp("@name"), dir))
{
if (!isContainerized())
{
appendCurrentDirectory(dir, false);
addPathSepChar(dir);
dir.append("debuginfo"); // use ./debuginfo in non-containerized mode
}
else
{
IWARNLOG("Failed to get debug directory");
return;
}
}
addPathSepChar(dir);

StringArray expirylist;
Owned<IDFAttributesIterator> iter = queryDistributedFileDirectory().getDFAttributesIterator("*", udesc, true, false);
ForEach(*iter)
Expand Down

0 comments on commit b58cb35

Please sign in to comment.