[Box Backup-commit] COMMIT r2281 - box/trunk/bin/bbstored

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Sat, 13 Sep 2008 16:28:38 +0100 (BST)


Author: chris
Date: 2008-09-13 16:28:38 +0100 (Sat, 13 Sep 2008)
New Revision: 2281

Modified:
   box/trunk/bin/bbstored/BBStoreDHousekeeping.cpp
Log:
Allow stopping housekeeping during a run, between accounts, when the
daemon is requested to terminate or to reload its configuration.


Modified: box/trunk/bin/bbstored/BBStoreDHousekeeping.cpp
===================================================================
--- box/trunk/bin/bbstored/BBStoreDHousekeeping.cpp	2008-09-13 15:12:17 UTC (rev 2280)
+++ box/trunk/bin/bbstored/BBStoreDHousekeeping.cpp	2008-09-13 15:28:38 UTC (rev 2281)
@@ -46,6 +46,12 @@
 	{
 		RunHousekeepingIfNeeded();
 
+		// Stop early?
+		if(StopRun())
+		{
+			break;
+		}
+
 		// Calculate how long should wait before doing the next 
 		// housekeeping run
 		int64_t timeNow = GetCurrentBoxTime();