From 6a85ec04806aa11ad242e09a4a810e2451200932 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 28 Aug 2023 16:52:08 +0200 Subject: [PATCH] Also handle SIGTERM to cleanup jobs --- apps/peertube-runner/src/server/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/peertube-runner/src/server/server.ts b/apps/peertube-runner/src/server/server.ts index 825e3f297..72e0d5ee5 100644 --- a/apps/peertube-runner/src/server/server.ts +++ b/apps/peertube-runner/src/server/server.ts @@ -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')