Add a timeout for update as well
this will send a notification if an update gets stuck
This commit is contained in:
@@ -249,10 +249,13 @@ function updateToLatest(options, auditSource, callback) {
|
||||
|
||||
eventlog.add(eventlog.ACTION_UPDATE, auditSource, { taskId, boxUpdateInfo });
|
||||
|
||||
tasks.startTask(taskId, {}, (error) => {
|
||||
tasks.startTask(taskId, { timeout: 20 * 60 * 60 * 1000 /* 20 hours */ }, (error) => {
|
||||
locker.unlock(locker.OP_BOX_UPDATE);
|
||||
|
||||
debug('Update failed with error', error);
|
||||
|
||||
const timedOut = error.code === tasks.ETIMEOUT;
|
||||
eventlog.add(eventlog.ACTION_UPDATE_FINISH, auditSource, { taskId, errorMessage: error.message, timedOut });
|
||||
});
|
||||
|
||||
callback(null, taskId);
|
||||
|
||||
Reference in New Issue
Block a user