diff options
Diffstat (limited to 'bin/bbstored/BBStoreDHousekeeping.cpp')
-rw-r--r-- | bin/bbstored/BBStoreDHousekeeping.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/bin/bbstored/BBStoreDHousekeeping.cpp b/bin/bbstored/BBStoreDHousekeeping.cpp index 16a1432a..1c1767ca 100644 --- a/bin/bbstored/BBStoreDHousekeeping.cpp +++ b/bin/bbstored/BBStoreDHousekeeping.cpp @@ -46,6 +46,12 @@ void BackupStoreDaemon::HousekeepingProcess() { RunHousekeepingIfNeeded(); + // Stop early? + if(StopRun()) + { + break; + } + // Calculate how long should wait before doing the next // housekeeping run int64_t timeNow = GetCurrentBoxTime(); @@ -155,7 +161,11 @@ void BackupStoreDaemon::RunHousekeepingIfNeeded() void BackupStoreDaemon::OnIdle() { - #ifdef WIN32 + if (!IsSingleProcess()) + { + return; + } + if (!mHousekeepingInited) { HousekeepingInit(); @@ -163,7 +173,6 @@ void BackupStoreDaemon::OnIdle() } RunHousekeepingIfNeeded(); - #endif } // -------------------------------------------------------------------------- @@ -193,7 +202,8 @@ bool BackupStoreDaemon::CheckForInterProcessMsg(int AccountNum, int MaximumWaitT std::string line; if(mInterProcessComms.GetLine(line, false /* no pre-processing */, MaximumWaitTime)) { - TRACE1("Housekeeping received command '%s' over interprocess comms\n", line.c_str()); + BOX_TRACE("Housekeeping received command '" << line << + "' over interprocess comms"); int account = 0; |