get rid of all the NOOP_CALLBACKs

This commit is contained in:
Girish Ramakrishnan
2021-09-17 09:22:46 -07:00
parent b3fe2a4b84
commit c5794b5ecd
8 changed files with 88 additions and 122 deletions
+3 -3
View File
@@ -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) {