tasks: add completed flag
in some cases, the tasks are setting percent to 100 and crashing later
This commit is contained in:
+2
-1
@@ -110,7 +110,8 @@ async function main() {
|
||||
const [runError, result] = await safe(TASKS[task.type].apply(null, task.args.concat(progressCallback)));
|
||||
const progress = {
|
||||
result: result || null,
|
||||
error: runError ? JSON.parse(JSON.stringify(runError, Object.getOwnPropertyNames(runError))) : null
|
||||
error: runError ? JSON.parse(JSON.stringify(runError, Object.getOwnPropertyNames(runError))) : null,
|
||||
percent: 100
|
||||
};
|
||||
|
||||
debug(`Task took ${(new Date() - startTime)/1000} seconds`);
|
||||
|
||||
Reference in New Issue
Block a user