feat(dispatch): queue async events durably

This commit is contained in:
2026-06-05 16:10:47 +08:00
parent 2cb02c8a91
commit dc48b5cd1f
6 changed files with 311 additions and 34 deletions
-1
View File
@@ -48,7 +48,6 @@ type Option func(*WorkerPool)
func NewWorkerPool(db ...*gorm.DB) *WorkerPool {
wp := &WorkerPool{
handlers: make(map[string]JobHandler),
queues: []string{model.DefaultBackgroundJobQueue},
workerID: fmt.Sprintf("worker-%d", time.Now().UnixNano()),
workerCount: 1,
pollInterval: 500 * time.Millisecond,