Kill all tasks on shutdown and startup
BindsTo will kill all the tasks when systemctl stop box is executed. But when restarted, it keeps the tasks running. Because of this behavior, we kill the tasks on startup and stop of the box code.
This commit is contained in:
@@ -66,7 +66,7 @@ function uninitialize(callback) {
|
||||
|
||||
async.series([
|
||||
cron.stopJobs,
|
||||
platform.stop
|
||||
platform.stopAllTasks
|
||||
], callback);
|
||||
}
|
||||
|
||||
@@ -109,6 +109,9 @@ function notifyUpdate(callback) {
|
||||
|
||||
// each of these tasks can fail. we will add some routes to fix/re-run them
|
||||
function runStartupTasks() {
|
||||
// stop all the systemd tasks
|
||||
platform.stopAllTasks(NOOP_CALLBACK);
|
||||
|
||||
// configure nginx to be reachable by IP
|
||||
reverseProxy.writeDefaultConfig(NOOP_CALLBACK);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user