diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-04 13:18:04 -0800 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-04 13:18:04 -0800 |
commit | ba1a85c4833820bc228779aa9187315d8b711268 (patch) | |
tree | f71cb70ae6f92b5895e573ca35a7369a11fea49a /src/server/index.ts | |
parent | 987b512d2564710e5c5c7fd2eeff1914af8180dd (diff) |
added graceful kill option, rename
Diffstat (limited to 'src/server/index.ts')
-rw-r--r-- | src/server/index.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/index.ts b/src/server/index.ts index 7eb8b12be..4400687d8 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -94,7 +94,8 @@ function routeSetter({ isRelease, addSupervisedRoute, logRegistrationOutcome }: secureHandler: ({ req, res }) => { if (req.params.key === process.env.session_key) { res.send("<img src='https://media.giphy.com/media/NGIfqtcS81qi4/giphy.gif' style='width:100%;height:100%;'/>"); - setTimeout(() => process.send!({ action: { message: "kill" } }), 1000 * 5); + // setTimeout(() => process.send!({ action: { message: "kill" } }), 1000 * 5); + process.send!({ action: { message: "kill" } }); } else { res.redirect("/home"); } @@ -132,11 +133,11 @@ function routeSetter({ isRelease, addSupervisedRoute, logRegistrationOutcome }: * Thread dependent session initialization */ if (isMaster) { - Session.initializeMaster().then(({ registerCommand }) => { + Session.initializeMonitorThread().then(({ registerCommand }) => { registerCommand("pull", [], () => execSync("git pull", { stdio: ["ignore", "inherit", "inherit"] })); }); } else { - Session.initializeWorker(async () => { + Session.initializeWorkerThread(async () => { await log_execution({ startMessage: "\nstarting execution of preliminary functions", endMessage: "completed preliminary functions\n", |