Title: [40678] trunk/hudson/plugins/thinBackup/src/main/java/org/jvnet/hudson/plugins/thinbackup: JENKINS-14288: thinBackup doesn't put back the current shutdown flag after backing up
- Revision
- 40678
- Author
- tofuatjava
- Date
- 2012-07-25 04:48:52 -0400 (Wed, 25 Jul 2012)
Log Message
JENKINS-14288: thinBackup doesn't put back the current shutdown flag after backing up
Modified Paths
Diff
Modified: trunk/hudson/plugins/thinBackup/src/main/java/org/jvnet/hudson/plugins/thinbackup/ThinBackupPeriodicWork.java (40677 => 40678)
--- trunk/hudson/plugins/thinBackup/src/main/java/org/jvnet/hudson/plugins/thinbackup/ThinBackupPeriodicWork.java 2012-07-22 19:18:14 UTC (rev 40677)
+++ trunk/hudson/plugins/thinBackup/src/main/java/org/jvnet/hudson/plugins/thinbackup/ThinBackupPeriodicWork.java 2012-07-25 08:48:52 UTC (rev 40678)
@@ -71,6 +71,8 @@
protected void backupNow(final BackupType type) {
final Hudson hudson = Hudson.getInstance();
+ final boolean inQuietModeBeforeBackup = hudson.isQuietingDown();
+
String backupPath = null;
try {
backupPath = plugin.getExpandedBackupPath();
@@ -93,7 +95,10 @@
backupPath);
LOGGER.log(Level.SEVERE, msg, e);
} finally {
- hudson.doCancelQuietDown();
+ if (!inQuietModeBeforeBackup)
+ hudson.doCancelQuietDown();
+ else
+ LOGGER.info("Backup process finsihed, but still in quiet mode as before. The quiet mode needs to be cancled manually, because it is not sure who is putting jenkins/hudson into quiet mode.");
}
}
Modified: trunk/hudson/plugins/thinBackup/src/main/java/org/jvnet/hudson/plugins/thinbackup/utils/Utils.java (40677 => 40678)
--- trunk/hudson/plugins/thinBackup/src/main/java/org/jvnet/hudson/plugins/thinbackup/utils/Utils.java 2012-07-22 19:18:14 UTC (rev 40677)
+++ trunk/hudson/plugins/thinBackup/src/main/java/org/jvnet/hudson/plugins/thinbackup/utils/Utils.java 2012-07-25 08:48:52 UTC (rev 40678)
@@ -116,7 +116,7 @@
}
if (!hudson.isQuietingDown() && starttime + unit.toMillis(timeout) < System.currentTimeMillis()) {
- LOGGER.info("Timeout reached! Force quiet mode for jenkins now and wait unilt all executors are idle.");
+ LOGGER.info("Force quiet mode for jenkins now and wait unilt all executors are idle.");
hudson.doQuietDown();
}
} while (running);