fix(queue): 提升媒体任务执行并发

This commit is contained in:
2026-07-24 10:31:18 +08:00
parent 36d1b18e10
commit d80b2e5ebf
+5 -1
View File
@@ -97,7 +97,11 @@ func (s *Service) startRiverQueue(ctx context.Context) error {
Logger: s.logger,
CompletedJobRetentionPeriod: 24 * time.Hour,
Queues: map[string]river.QueueConfig{
asyncTaskQueueName: {MaxWorkers: 32},
// Image providers may hold a worker while polling for several
// minutes. Keep enough workers available for production bursts so
// unrelated models do not remain queued behind long-running media
// tasks.
asyncTaskQueueName: {MaxWorkers: 64},
},
// Provider-backed media jobs commonly poll for 10-20 minutes. River may
// execute a still-running job again once this window elapses, so keep the