Move state enums to the model code
This commit is contained in:
@@ -4,8 +4,7 @@ exports = module.exports = {
|
||||
sync: sync
|
||||
};
|
||||
|
||||
var appdb = require('./appdb.js'),
|
||||
apps = require('./apps.js'),
|
||||
let apps = require('./apps.js'),
|
||||
assert = require('assert'),
|
||||
async = require('async'),
|
||||
constants = require('./constants.js'),
|
||||
@@ -149,7 +148,7 @@ function runTask(appId, taskName, callback) {
|
||||
apps.get(appId, function (error, app) {
|
||||
if (error) return callback(error);
|
||||
|
||||
if (app.installationState !== appdb.ISTATE_INSTALLED || app.runState !== appdb.RSTATE_RUNNING || app.health !== appdb.HEALTH_HEALTHY) {
|
||||
if (app.installationState !== apps.ISTATE_INSTALLED || app.runState !== apps.RSTATE_RUNNING || app.health !== apps.HEALTH_HEALTHY) {
|
||||
debug(`runTask: skipped task ${taskName} because app ${app.fqdn} has run state ${app.installationState}`);
|
||||
return callback();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user