From 163baa752f816198d58fbb5a70dd7744a6b66888 Mon Sep 17 00:00:00 2001 From: arc-alex Date: Wed, 29 Oct 2025 12:50:22 +0100 Subject: [PATCH] keep restorpoint on container shutdown --- apps/server/src/app.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/server/src/app.ts b/apps/server/src/app.ts index 1f2f9181a..068f7396c 100644 --- a/apps/server/src/app.ts +++ b/apps/server/src/app.ts @@ -269,6 +269,7 @@ export const shutdown = async (exitCode = 0) => { // 0 means it was a SIGNAL // 1 means crash -> keep the file // 2 means dev crash -> do nothing + // 3 means container shutdown -> keep the file // 99 means there was a shutdown request from the UI if (exitCode === 0 || exitCode === 99) { await restoreService.clear(); @@ -305,4 +306,4 @@ process.on('uncaughtException', async (error) => { // register shutdown signals process.once('SIGHUP', async () => shutdown(0)); process.once('SIGINT', async () => shutdown(0)); -process.once('SIGTERM', async () => shutdown(0)); +process.once('SIGTERM', async () => shutdown(3));