From d6974eec27cb6938ee826a7d86cca50fca9c03f6 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 12 Dec 2014 23:24:32 +0000 Subject: Don't stop waiitng until the deadline has actually expired. --- bin/bbackupd/BackupDaemon.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'bin') 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. -- cgit v1.2.3