From d7f9a547fc49664c0863f4eacf4b0580de29014c Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Fri, 6 Dec 2019 11:29:33 -0800 Subject: [PATCH] Disable requiredState check for now there is a race but this is mitigated by the checkAppState non-db logic for now --- src/apps.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;