Also handle SIGTERM to cleanup jobs

This commit is contained in:
Chocobozzz 2023-08-28 16:52:08 +02:00
parent e23b95a901
commit 6a85ec0480
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 1 deletions

View File

@ -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')