Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
josephjclark committed Sep 26, 2024
1 parent a2349e8 commit dcc3872
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/lightning-mock/src/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions packages/ws-worker/src/api/workloop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { Logger } from '@openfn/logger';
export type Workloop = {
stop: (reason?: string) => void;
isStopped: () => boolean;
}
};

const startWorkloop = (
app: ServerApp,
Expand Down Expand Up @@ -50,8 +50,8 @@ const startWorkloop = (
promise.cancel();
}
},
isStopped: () => cancelled
}
isStopped: () => cancelled,
};
};

export default startWorkloop;
6 changes: 3 additions & 3 deletions packages/ws-worker/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit dcc3872

Please sign in to comment.