diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-12-11 19:43:37 -0500 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-12-11 19:43:37 -0500 |
commit | e01499153fdd335493973dc79d80ccc4ae8df95c (patch) | |
tree | 5859fd2ca99db988c494bb03ae56fb74825b7ffd /src | |
parent | 4e8605c9e46acd3f3d9080073bdd6e80f049c85a (diff) |
first steps toward restructure of session daemon
Diffstat (limited to 'src')
-rw-r--r-- | src/server/ChildProcessUtilities/daemon/session.ts (renamed from src/server/ChildProcessUtilities/daemon/persistence_daemon.ts) | 2 | ||||
-rw-r--r-- | src/server/index.ts | 14 |
2 files changed, 1 insertions, 15 deletions
diff --git a/src/server/ChildProcessUtilities/daemon/persistence_daemon.ts b/src/server/ChildProcessUtilities/daemon/session.ts index 888cf38b8..c41657cc9 100644 --- a/src/server/ChildProcessUtilities/daemon/persistence_daemon.ts +++ b/src/server/ChildProcessUtilities/daemon/session.ts @@ -94,7 +94,7 @@ async function listen() { const success = error === null && result !== undefined; return identifier + success ? " Child process spawned..." : ` An error occurred while attempting to restart the server:\n${error}`; }, - action: () => ProcessFactory.createWorker('npm', ['run', 'start-spawn'], "inherit"), + action: () => ProcessFactory.createWorker('npm', ['run', 'start'], "inherit"), color: green }); writeLocalPidLog("server", `${(current_backup?.pid ?? -2) + 1} created ${timestamp()}`); diff --git a/src/server/index.ts b/src/server/index.ts index bebb9b365..bc481e579 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -121,20 +121,6 @@ function routeSetter({ isRelease, addSupervisedRoute, logRegistrationOutcome }: } }); - let daemonInitialized = false; - const { SPAWNED, RELEASE } = process.env; - addSupervisedRoute({ - method: Method.GET, - subscription: "/persist", - onValidation: ({ res }) => { - if (RELEASE && !SPAWNED && !daemonInitialized) { - daemonInitialized = true; - ProcessFactory.NamedAgents.persistenceDaemon(); - } - res.redirect("/home"); - } - }); - logRegistrationOutcome(); // initialize the web socket (bidirectional communication: if a user changes |