From dcc38728fddbd67455b20da4e6c7e3b23462f49e Mon Sep 17 00:00:00 2001 From: Joe Clark Date: Thu, 26 Sep 2024 13:59:42 +0100 Subject: [PATCH] format --- packages/lightning-mock/src/start.ts | 2 +- packages/ws-worker/src/api/workloop.ts | 6 +++--- packages/ws-worker/src/server.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/lightning-mock/src/start.ts b/packages/lightning-mock/src/start.ts index d9f15186e..e86ec7c7f 100644 --- a/packages/lightning-mock/src/start.ts +++ b/packages/lightning-mock/src/start.ts @@ -32,7 +32,7 @@ const server = createLightningServer({ port: args.port, logger, logLevel: args.log, - runPrivateKey: process.env.WORKER_RUNS_PRIVATE_KEY + runPrivateKey: process.env.WORKER_RUNS_PRIVATE_KEY, }); // add a default credential diff --git a/packages/ws-worker/src/api/workloop.ts b/packages/ws-worker/src/api/workloop.ts index 9f5155b9d..cbe6b7cc3 100644 --- a/packages/ws-worker/src/api/workloop.ts +++ b/packages/ws-worker/src/api/workloop.ts @@ -8,7 +8,7 @@ import type { Logger } from '@openfn/logger'; export type Workloop = { stop: (reason?: string) => void; isStopped: () => boolean; -} +}; const startWorkloop = ( app: ServerApp, @@ -50,8 +50,8 @@ const startWorkloop = ( promise.cancel(); } }, - isStopped: () => cancelled - } + isStopped: () => cancelled, + }; }; export default startWorkloop; diff --git a/packages/ws-worker/src/server.ts b/packages/ws-worker/src/server.ts index 6e90d68c6..c77fb755c 100644 --- a/packages/ws-worker/src/server.ts +++ b/packages/ws-worker/src/server.ts @@ -95,13 +95,13 @@ function connect(app: ServerApp, logger: Logger, options: ServerOptions = {}) { logger.break(); } - app.resumeWorkloop() + app.resumeWorkloop(); }; // We were disconnected from the queue const onDisconnect = () => { if (!app.workloop?.isStopped()) { - app.workloop?.stop('Socket disconnected unexpectedly') + app.workloop?.stop('Socket disconnected unexpectedly'); } if (!app.destroyed) { logger.info('Connection to lightning lost'); @@ -186,7 +186,7 @@ function createServer(engine: RuntimeEngine, options: ServerOptions = {}) { options.maxWorkflows ); } - } + }; // TODO this probably needs to move into ./api/ somewhere app.execute = async ({ id, token }: ClaimRun) => {