clear backup progress when initiating backup
this ensures that tools can do: 1. backup 2. wait_for_backup without the synchronous clear, we might get the progress state of an earlier backup.
This commit is contained in:
@@ -549,6 +549,9 @@ function backup(callback) {
|
||||
var error = locker.lock(locker.OP_FULL_BACKUP);
|
||||
if (error) return callback(new CloudronError(CloudronError.BAD_STATE, error.message));
|
||||
|
||||
// clearing backup ensures tools can 'wait' on progress
|
||||
progress.clear(progress.BACKUP);
|
||||
|
||||
// start the backup operation in the background
|
||||
backupBoxAndApps(function (error) {
|
||||
if (error) console.error('backup failed.', error);
|
||||
|
||||
Reference in New Issue
Block a user