From 8719371bd2eb7bd0b5db78f91985a8d2cb72ed21 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Tue, 23 Aug 2022 22:27:51 -0400 Subject: [PATCH] Add basic 'kill' requesting. --- src/lib/constants.js | 3 ++- src/lib/state.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/constants.js b/src/lib/constants.js index 41ba705..df1e712 100644 --- a/src/lib/constants.js +++ b/src/lib/constants.js @@ -2,7 +2,8 @@ import { npm_package_version } from "$env/static/private"; export const queryMode = { REAL_TIME: 'realTime', - ONE_SHOT: 'oneShot' + ONE_SHOT: 'oneShot', + KILL: 'kill' } export const backendAddressAndPort = 'localhost:3000' diff --git a/src/lib/state.js b/src/lib/state.js index 06217c9..f4689c9 100644 --- a/src/lib/state.js +++ b/src/lib/state.js @@ -93,6 +93,9 @@ export const killQuery = async ({ }) => { runTestQuery = false return } + ws.send(JSON.stringify({ + mode: queryMode.KILL, + })) } // noinspection JSUnusedGlobalSymbols