mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-03 06:24:30 +00:00
feat(web): support SHUMAI_WORKERS environment variable
This commit is contained in:
@@ -87,12 +87,12 @@ async function run() {
|
|||||||
assetService.startCleanupJob()
|
assetService.startCleanupJob()
|
||||||
notificationJobService.start()
|
notificationJobService.start()
|
||||||
const args = process.argv.slice(2)
|
const args = process.argv.slice(2)
|
||||||
let workersOption = 'all'
|
let workersOption = process.env.SHUMAI_WORKERS || 'all'
|
||||||
for (let i = 0; i < args.length; i++) {
|
for (let i = 0; i < args.length; i++) {
|
||||||
if (args[i] === '--workers') {
|
if (args[i] === '--workers') {
|
||||||
workersOption = args[i + 1] || 'all'
|
workersOption = args[i + 1] || workersOption
|
||||||
} else if (args[i].startsWith('--workers=')) {
|
} else if (args[i].startsWith('--workers=')) {
|
||||||
workersOption = args[i].split('=')[1] || 'all'
|
workersOption = args[i].split('=')[1] || workersOption
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user