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

Function awaitHardStop

examples/docker/worker/src/worker.ts:120–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118}
119
120function awaitHardStop() {
121 const timeout = process.env.SHUTDOWN_TIMEOUT
122 ? parseInt(process.env.SHUTDOWN_TIMEOUT)
123 : 1000 * 30;
124 return setTimeout(() => {
125 console.error(
126 `Process did not terminate within ${timeout}ms. Stopping now!`,
127 );
128 process.nextTick(() => process.exit(1));
129 }, timeout);
130}
131
132// handle errors & rejections
133process.on("uncaughtException", (error) => {

Callers 1

worker.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected