Add a timeout for update as well

this will send a notification if an update gets stuck
This commit is contained in:
Girish Ramakrishnan
2019-10-14 09:30:20 -07:00
parent 488763fc42
commit a19662bdfa
5 changed files with 64 additions and 5 deletions

View File

@@ -119,7 +119,7 @@ function notifyUpdate(callback) {
const version = safe.fs.readFileSync(paths.VERSION_FILE, 'utf8');
if (version === constants.VERSION) return callback();
eventlog.add(eventlog.ACTION_UPDATE_FINISH, auditSource.CRON, { oldVersion: version || 'dev', newVersion: constants.VERSION }, function (error) {
eventlog.add(eventlog.ACTION_UPDATE_FINISH, auditSource.CRON, { errorMessage: '', oldVersion: version || 'dev', newVersion: constants.VERSION }, function (error) {
if (error) return callback(new CloudronError(CloudronError.INTERNAL_ERROR, error));
tasks.setCompletedByType(tasks.TASK_UPDATE, { error: null }, function (error) {