MCPcopy Create free account
hub / github.com/actionhero/node-resque / tryShutdown

Function tryShutdown

examples/cluster.ts:52–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51 // just a helper for this demo
52 async function tryShutdown() {
53 if (jobsToComplete === 0) {
54 await new Promise((resolve) => {
55 setTimeout(resolve, 500);
56 });
57 await scheduler.end();
58 await worker.end();
59 process.exit();
60 }
61 }
62
63 // /////////////////
64 // START A WORKER //

Callers 1

bootFunction · 0.70

Calls 1

endMethod · 0.45

Tested by

no test coverage detected