MCPcopy Index your code
hub / github.com/wei/pull / gracefulShutdown

Function gracefulShutdown

src/worker.ts:42–51  ·  view source on GitHub ↗
(signal: string)

Source from the content-addressed store, hash-verified

40});
41
42const gracefulShutdown = async (signal: string) => {
43 console.log(`Received ${signal}, closing worker...`);
44 await worker.close();
45 try {
46 await redisClient.quit();
47 } catch {
48 // ignore
49 }
50 Deno.exit(0);
51};
52
53Deno.addSignalListener("SIGINT", () => gracefulShutdown("SIGINT"));
54Deno.addSignalListener("SIGTERM", () => gracefulShutdown("SIGTERM"));

Callers 1

worker.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected