feat(web): support SHUMAI_WORKERS environment variable

This commit is contained in:
yiling
2026-10-17 16:46:46 +08:00
parent 5f89be86d6
commit 6966e5876e
+3 -3
View File
@@ -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
}
}