set migrate progress

This commit is contained in:
Girish Ramakrishnan
2016-06-28 15:34:04 -05:00
parent 823290aa29
commit c7c6944e5f
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -722,6 +722,7 @@ function migrate(size, region, callback) {
if (error) {
debug('Failed to migrate', error);
locker.unlock(locker.OP_MIGRATE);
progress.set(progress.MIGRATE, -1, error.message);
} else {
debug('Migration initiated successfully');
// do not unlock; cloudron is migrating
@@ -730,6 +731,8 @@ function migrate(size, region, callback) {
return;
}
progress.set(progress.MIGRATE, 0, 'Started');
// initiate the migration in the background
backups.backupBoxAndApps({ userId: null, username: 'migrator' }, function (error, backupId) {
if (error) return unlock(error);