diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-11 13:42:06 -0500 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-11 13:42:06 -0500 |
| commit | 86f1e0f58940904b8c55284f6787e7422a6665ff (patch) | |
| tree | faeba5e08d5a6fc99aa4f26cd246aca3af3bca5d /src/server/DashSession | |
| parent | 120fa84b3e8c794dd882d3613067c5b18ee7ba04 (diff) | |
refactor
Diffstat (limited to 'src/server/DashSession')
| -rw-r--r-- | src/server/DashSession/DashSessionAgent.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/DashSession/DashSessionAgent.ts b/src/server/DashSession/DashSessionAgent.ts index 23d421835..de8e7240f 100644 --- a/src/server/DashSession/DashSessionAgent.ts +++ b/src/server/DashSession/DashSessionAgent.ts @@ -11,7 +11,7 @@ import { resolve } from "path"; import { AppliedSessionAgent, ExitHandler } from "../session/agents/applied_session_agent"; import { Monitor } from "../session/agents/monitor"; import { ServerWorker } from "../session/agents/server_worker"; -import { Message } from "../session/utilities/ipc"; +import { MessageHandler } from "../session/utilities/ipc"; /** * If we're the monitor (master) thread, we should launch the monitor logic for the session. @@ -34,8 +34,8 @@ export class DashSessionAgent extends AppliedSessionAgent { monitor.addReplCommand("backup", [], this.backup); monitor.addReplCommand("debug", [/active|passive/, /\S+\@\S+/], async ([mode, recipient]) => this.dispatchZippedDebugBackup(mode, recipient)); monitor.on("backup", this.backup); - monitor.on("debug", ({ args: { mode, recipient } }) => this.dispatchZippedDebugBackup(mode, recipient)); - monitor.hooks.crashDetected(this.dispatchCrashReport); + monitor.on("debug", ({ mode, recipient }) => this.dispatchZippedDebugBackup(mode, recipient)); + monitor.coreHooks.onCrashDetected(this.dispatchCrashReport); } /** @@ -101,7 +101,7 @@ export class DashSessionAgent extends AppliedSessionAgent { /** * This sends an email with the generated crash report. */ - private dispatchCrashReport = async ({ args: { error: crashCause } }: Message) => { + private dispatchCrashReport: MessageHandler<{ error: Error }> = async ({ error: crashCause }) => { const { mainLog } = this.sessionMonitor; const { notificationRecipient } = DashSessionAgent; const error = await Email.dispatch({ |
