Add tasks.setCompleted
this lets us easily grep the code on where the task is completed
This commit is contained in:
+1
-2
@@ -59,12 +59,11 @@ initialize(function (error) {
|
||||
const resultCallback = (error, result) => {
|
||||
// Error object has properties with enumerable: false (https://mattcbaker.com/posts/stringify-javascript-error/)
|
||||
const progress = {
|
||||
percent: 100,
|
||||
result: result || null,
|
||||
error: error ? JSON.parse(JSON.stringify(error, Object.getOwnPropertyNames(error))) : null
|
||||
};
|
||||
|
||||
tasks.update(taskId, progress, () => process.exit(error ? 50 : 0));
|
||||
tasks.setCompleted(taskId, progress, () => process.exit(error ? 50 : 0));
|
||||
};
|
||||
|
||||
TASKS[task.type].apply(null, task.args.concat(progressCallback).concat(resultCallback));
|
||||
|
||||
Reference in New Issue
Block a user