diff --git a/src/apps.js b/src/apps.js index c715925fc..8dee74c9e 100644 --- a/src/apps.js +++ b/src/apps.js @@ -622,8 +622,8 @@ function addTask(appId, installationState, task, callback) { assert.strictEqual(typeof callback, 'function'); const { args, values } = task; - // by default, a task can only run on installed state. if it's null, it can be run on any state - const requiredState = 'requiredState' in task ? task.requiredState : exports.ISTATE_INSTALLED; + // TODO: match the SQL logic to match checkAppState. this means checking the error.installationState and installationState. Unfortunately, former is JSON right now + const requiredState = null; // 'requiredState' in task ? task.requiredState : exports.ISTATE_INSTALLED; const scheduleNow = 'scheduleNow' in task ? task.scheduleNow : true; const requireNullTaskId = 'requireNullTaskId' in task ? task.requireNullTaskId : true;