Fixes to service configuration

restart service does not rebuild automatically, we should add a route
for that. we need to figure where to scale services etc if we randomly
create containers like that.
This commit is contained in:
Girish Ramakrishnan
2021-01-21 12:53:38 -08:00
parent 47a598a494
commit 9f9575f46a
11 changed files with 200 additions and 190 deletions

View File

@@ -13,7 +13,7 @@ let assert = require('assert'),
path = require('path'),
paths = require('./paths.js'),
scheduler = require('./scheduler.js'),
sftp = require('./sftp.js'),
services = require('./services.js'),
tasks = require('./tasks.js');
let gActiveTasks = { }; // indexed by app id
@@ -80,7 +80,7 @@ function scheduleTask(appId, taskId, options, callback) {
locker.unlock(locker.OP_APPTASK); // unlock event will trigger next task
// post app task hooks
sftp.rebuild(error => { if (error) debug('Unable to rebuild sftp:', error); });
services.rebuildService('sftp', error => { if (error) debug('Unable to rebuild sftp:', error); });
scheduler.resumeJobs(appId);
});
}