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

Function tryShutdown

examples/example.ts:59–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57
58 // just a helper for this demo
59 async function tryShutdown() {
60 if (jobsToComplete === 0) {
61 await new Promise((resolve) => {
62 setTimeout(resolve, 500);
63 });
64 await scheduler.end();
65 await worker.end();
66 process.exit();
67 }
68 }
69
70 // /////////////////
71 // START A WORKER //

Callers 1

bootFunction · 0.70

Calls 1

endMethod · 0.45

Tested by

no test coverage detected