diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-12-12 23:24:32 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-12-12 23:24:32 +0000 |
commit | d6974eec27cb6938ee826a7d86cca50fca9c03f6 (patch) | |
tree | 48328a605fc09a080350f7cf9a21e3f7148d70be /bin | |
parent | 5157e0d1b012ecc02e2fae84ad13630dffea752e (diff) |
Don't stop waiitng until the deadline has actually expired.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/bbackupd/BackupDaemon.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp index 39c62d3b..cfaeeef6 100644 --- a/bin/bbackupd/BackupDaemon.cpp +++ b/bin/bbackupd/BackupDaemon.cpp @@ -640,22 +640,27 @@ void BackupDaemon::Run2() BOX_INFO("Starting a backup immediately due to " "bbackupctl sync command"); } + else if(GetCurrentBoxTime() < mNextSyncTime) + { + BOX_TRACE("Deadline not reached, sleeping again"); + continue; + } else if(mDoSyncForcedByPreviousSyncError) { BOX_INFO("Last backup was not successful, next one " "starting now"); } - else if(automaticBackup) - { - BOX_INFO("Automatic backups are enabled, next one " - "starting now"); - } - else + else if(!automaticBackup) { BOX_TRACE("Sleeping again because automatic backups " "are not enabled"); continue; } + else + { + BOX_INFO("Automatic backups are enabled, next one " + "starting now"); + } // If we pass this point, or exit the loop, we should have // logged something at INFO level or higher to explain why. |