mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-24 02:48:21 +00:00
feat(deploy): add shumai-transcode docker image and k8s autoscaling example with garage s3
This commit is contained in:
@@ -17,6 +17,22 @@ async function run() {
|
||||
console.log('🚀 Starting Transcode Worker...')
|
||||
|
||||
await workflowService.startWorkers(TaskQueueTranscode)
|
||||
|
||||
let isShuttingDown = false
|
||||
const shutdown = async () => {
|
||||
if (isShuttingDown) return
|
||||
isShuttingDown = true
|
||||
console.log('Shutting down Transcode Worker gracefully...')
|
||||
try {
|
||||
await workflowService.shutdownWorkers()
|
||||
} catch (err) {
|
||||
console.error('Error during Transcode Worker shutdown:', err)
|
||||
}
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
process.on('SIGINT', shutdown)
|
||||
process.on('SIGTERM', shutdown)
|
||||
}
|
||||
|
||||
handleDaemonCommands('shumai-transcode', run).catch((err) => {
|
||||
|
||||
Reference in New Issue
Block a user