From f4f6f4e7e07cb3072f7709b070ba598ba4339991 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Fri, 29 Jun 2018 16:56:36 +0200 Subject: [PATCH] Use business logic for getting all apps in taskmanager --- src/taskmanager.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/taskmanager.js b/src/taskmanager.js index 9b22413ea..0b734dd34 100644 --- a/src/taskmanager.js +++ b/src/taskmanager.js @@ -13,6 +13,7 @@ exports = module.exports = { }; var appdb = require('./appdb.js'), + apps = require('./apps.js'), assert = require('assert'), async = require('async'), child_process = require('child_process'), @@ -43,12 +44,11 @@ function resumeTasks(callback) { gPaused = false; - appdb.getAll(function (error, apps) { + apps.getAll(function (error, result) { if (error) return callback(error); - apps.forEach(function (app) { + result.forEach(function (app) { if (app.installationState === appdb.ISTATE_INSTALLED && app.runState === appdb.RSTATE_RUNNING) return; - if (app.installationState === appdb.ISTATE_ERROR) return; debug('Creating process for %s (%s) with state %s', app.fqdn, app.id, app.installationState);