Disable requiredState check for now

there is a race but this is mitigated by the checkAppState non-db logic
for now
This commit is contained in:
Girish Ramakrishnan
2019-12-06 11:29:33 -08:00
parent 6a64f24e98
commit d7f9a547fc

View File

@@ -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;