[Box Backup-commit] COMMIT r2324 - box/trunk/bin/bbackupd

boxbackup-dev@boxbackup.org boxbackup-dev@boxbackup.org
Sun, 5 Oct 2008 00:15:56 +0100 (BST)


Author: chris
Date: 2008-10-05 00:15:55 +0100 (Sun, 05 Oct 2008)
New Revision: 2324

Modified:
   box/trunk/bin/bbackupd/BackupDaemon.cpp
Log:
Log statistics before BackupFinish event, so that they can be used
in reporting in the NotifyScript.


Modified: box/trunk/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/trunk/bin/bbackupd/BackupDaemon.cpp	2008-10-04 19:28:15 UTC (rev 2323)
+++ box/trunk/bin/bbackupd/BackupDaemon.cpp	2008-10-04 23:15:55 UTC (rev 2324)
@@ -974,12 +974,6 @@
 	// Log
 	BOX_NOTICE("Finished scan of local files");
 
-	// Notify administrator
-	NotifySysadmin(SysadminNotifier::BackupFinish);
-
-	// Tell anything connected to the command socket
-	SendSyncStartOrFinish(false /* finish */);
-
 	// Log the stats
 	BOX_NOTICE("File statistics: total file size uploaded "
 		<< BackupStoreFile::msStats.mBytesInEncodedFiles
@@ -991,6 +985,12 @@
 	// Reset statistics again
 	BackupStoreFile::ResetStats();
 
+	// Notify administrator
+	NotifySysadmin(SysadminNotifier::BackupFinish);
+
+	// Tell anything connected to the command socket
+	SendSyncStartOrFinish(false /* finish */);
+
 	// Touch a file to record times in filesystem
 	TouchFileInWorkingDir("last_sync_finish");
 }