From c8aa6a62c29645589481f77ba8b5e336ea4be8f3 Mon Sep 17 00:00:00 2001 From: Zack Pollard Date: Fri, 17 May 2024 15:10:57 +0100 Subject: [PATCH] fix: when using old script args, just set the workers include var (#9552) * fix: when using old script args, just set the workers include var and move on * fix: set process.title when using new bootstrap worker startup method --- server/src/main.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/server/src/main.ts b/server/src/main.ts index 68cf73dd13..84ba1f056d 100644 --- a/server/src/main.ts +++ b/server/src/main.ts @@ -32,19 +32,22 @@ function bootstrap() { return bootstrapImmichAdmin(); } case 'immich': { - process.title = 'immich_server'; - return bootstrapWorker('api'); + if (!process.env.IMMICH_WORKERS_INCLUDE) { + process.env.IMMICH_WORKERS_INCLUDE = 'api'; + } + break; } case 'microservices': { - process.title = 'immich_microservices'; - return bootstrapWorker('microservices'); - } - default: { - for (const worker of getWorkers()) { - bootstrapWorker(worker); + if (!process.env.IMMICH_WORKERS_INCLUDE) { + process.env.IMMICH_WORKERS_INCLUDE = 'microservices'; } + break; } } + process.title = 'immich'; + for (const worker of getWorkers()) { + bootstrapWorker(worker); + } } void bootstrap();