feat(cli): add daemon mode and stop, logs, restart subcommands

This commit is contained in:
yiling
2026-06-20 12:37:49 +08:00
parent 3e122a86f0
commit 93b4656939
6 changed files with 502 additions and 94 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ loadEnvConfig(process.cwd(), process.env.NODE_ENV !== 'production')
import { initTranscodeWorkflows } from '@shumai/transcode'
import { TaskQueueTranscode, workflowService } from '@shumai/workflow-core'
import { handleDaemonCommands } from '@shumai/core/src/utils/daemon'
if (process.argv.includes('--check')) {
console.log('✅ Transcode worker evaluated successfully!')
@@ -27,7 +28,7 @@ async function run() {
await workflowService.startWorkers(TaskQueueTranscode, options)
}
run().catch((err) => {
handleDaemonCommands('shumai-transcode', run).catch((err) => {
console.error(err)
process.exit(1)
})