get rid of all the NOOP_CALLBACKs
This commit is contained in:
+3
-3
@@ -159,7 +159,7 @@ async function add(type, args) {
|
||||
function startTask(id, options, callback) {
|
||||
assert.strictEqual(typeof id, 'string');
|
||||
assert.strictEqual(typeof options, 'object');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
assert(typeof callback === 'undefined' || typeof callback === 'function');
|
||||
|
||||
const logFile = options.logFile || `${paths.TASKS_LOG_DIR}/${id}.log`;
|
||||
debug(`startTask - starting task ${id} with options ${JSON.stringify(options)}. logs at ${logFile}`);
|
||||
@@ -202,9 +202,9 @@ function startTask(id, options, callback) {
|
||||
|
||||
delete gTasks[id];
|
||||
|
||||
callback(taskError, task ? task.result : null);
|
||||
if (callback) callback(taskError, task ? task.result : null);
|
||||
|
||||
debug(`startTask: ${id} done`);
|
||||
debug(`startTask: ${id} done. error: `, taskError);
|
||||
});
|
||||
|
||||
if (options.timeout) {
|
||||
|
||||
Reference in New Issue
Block a user