make task args an object and put it in eventlog

This commit is contained in:
Girish Ramakrishnan
2018-11-30 14:57:24 -08:00
parent f39ce20580
commit c72ea91743
5 changed files with 8 additions and 8 deletions

View File

@@ -26,7 +26,7 @@ function backup(req, res, next) {
// note that cloudron.backup only waits for backup initiation and not for backup to complete
// backup progress can be checked up ny polling the progress api call
var auditSource = { userId: null, username: 'sysadmin' };
tasks.startTask(tasks.TASK_BACKUP, [], auditSource, function (error) {
tasks.startTask(tasks.TASK_BACKUP, {}, auditSource, function (error) {
if (error && error.reason === TasksError.BAD_STATE) return next(new HttpError(409, error.message));
if (error) return next(new HttpError(500, error));