tasks: add pending field
this indicates if a task is scheduled. previously, we relied on task.progress being 1
This commit is contained in:
+2
-2
@@ -33,8 +33,8 @@ const TASKS = { // indexed by task type
|
||||
syncDyndns: dyndns.sync,
|
||||
updateDiskUsage: system.updateDiskUsage,
|
||||
|
||||
_identity: async (arg, progressCallback) => { progressCallback({}); return arg; },
|
||||
_error: async (arg, progressCallback) => { progressCallback({}); throw new Error(`Failed for arg: ${arg}`); },
|
||||
_identity: async (arg, progressCallback) => { progressCallback({ percent: 20 }); return arg; },
|
||||
_error: async (arg, progressCallback) => { progressCallback({ percent: 20 }); throw new Error(`Failed for arg: ${arg}`); },
|
||||
_crash: (arg) => { throw new Error(`Crashing for arg: ${arg}`); }, // the test looks for this debug string in the log file
|
||||
_sleep: async (arg) => setTimeout(process.exit, arg)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user