From 6966e5876ef4fa3f370eb93fc9de31fe122af467 Mon Sep 17 00:00:00 2001 From: yiling Date: Sat, 17 Oct 2026 16:46:46 +0800 Subject: [PATCH] feat(web): support SHUMAI_WORKERS environment variable --- apps/web/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/index.ts b/apps/web/src/index.ts index 5cef4e80..2ef0746a 100644 --- a/apps/web/src/index.ts +++ b/apps/web/src/index.ts @@ -87,12 +87,12 @@ async function run() { assetService.startCleanupJob() notificationJobService.start() const args = process.argv.slice(2) - let workersOption = 'all' + let workersOption = process.env.SHUMAI_WORKERS || 'all' for (let i = 0; i < args.length; i++) { if (args[i] === '--workers') { - workersOption = args[i + 1] || 'all' + workersOption = args[i + 1] || workersOption } else if (args[i].startsWith('--workers=')) { - workersOption = args[i].split('=')[1] || 'all' + workersOption = args[i].split('=')[1] || workersOption } }