Move state enums to the model code
This commit is contained in:
@@ -5,8 +5,7 @@ exports = module.exports = {
|
||||
scheduleTask: scheduleTask
|
||||
};
|
||||
|
||||
var appdb = require('./appdb.js'),
|
||||
apps = require('./apps.js'),
|
||||
let apps = require('./apps.js'),
|
||||
assert = require('assert'),
|
||||
debug = require('debug')('box:taskmanager'),
|
||||
fs = require('fs'),
|
||||
@@ -91,8 +90,8 @@ function resumeTasks(callback) {
|
||||
if (error) return callback(error);
|
||||
|
||||
result.forEach(function (app) {
|
||||
if (app.installationState === appdb.ISTATE_INSTALLED && app.runState === appdb.RSTATE_RUNNING) return;
|
||||
if (app.installationState === appdb.ISTATE_ERROR) return;
|
||||
if (app.installationState === apps.ISTATE_INSTALLED && app.runState === apps.RSTATE_RUNNING) return;
|
||||
if (app.installationState === apps.ISTATE_ERROR) return;
|
||||
|
||||
debug(`resumeTask: starting app task for ${app.fqdn} ${app.id} and state ${app.installationState}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user