Also handle SIGTERM to cleanup jobs
This commit is contained in:
parent
e23b95a901
commit
6a85ec0480
|
@ -54,7 +54,7 @@ export class RunnerServer {
|
|||
}
|
||||
|
||||
// Cleanup on exit
|
||||
for (const code of [ 'SIGINT', 'SIGUSR1', 'SIGUSR2', 'uncaughtException' ]) {
|
||||
for (const code of [ 'SIGTERM', 'SIGINT', 'SIGUSR1', 'SIGUSR2', 'uncaughtException' ]) {
|
||||
process.on(code, async (err, origin) => {
|
||||
if (code === 'uncaughtException') {
|
||||
logger.error({ err, origin }, 'uncaughtException')
|
||||
|
|
Loading…
Reference in New Issue