From 42c6fe50d292f5e7d3971ca8c81fdbb4b3cca24d Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Mon, 26 Aug 2019 16:05:40 -0700 Subject: [PATCH] Make progressCallback take an optional callback --- src/taskworker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/taskworker.js b/src/taskworker.js index 68af3eb58..82a20dfb8 100755 --- a/src/taskworker.js +++ b/src/taskworker.js @@ -53,7 +53,7 @@ initialize(function (error) { tasks.get(taskId, function (error, task) { if (error) return process.exit(50); - const progressCallback = (progress) => tasks.update(taskId, progress, NOOP_CALLBACK); + const progressCallback = (progress, cb) => tasks.update(taskId, progress, cb || NOOP_CALLBACK); const resultCallback = (error, result) => { const progress = { percent: 100, result: result || null, errorMessage: error ? error.message : null };