Add timing information for backups

This commit is contained in:
Girish Ramakrishnan
2020-07-31 12:59:15 -07:00
parent 37d81da806
commit a94b175805
2 changed files with 16 additions and 6 deletions

View File

@@ -47,6 +47,7 @@ function initialize(callback) {
}
// Main process starts here
const startTime = new Date();
debug(`Starting task ${taskId}`);
initialize(function (error) {
@@ -63,6 +64,8 @@ initialize(function (error) {
error: error ? JSON.parse(JSON.stringify(error, Object.getOwnPropertyNames(error))) : null
};
debug(`Task took ${(new Date() - startTime)/1000} seconds`);
tasks.setCompleted(taskId, progress, () => process.exit(error ? 50 : 0));
};