feat(worker): replace aggregate asynq concurrency with per-pool governance
Split the monolithic upstream worker budget into explicit core, post-process, enrichment, maintenance, and shared elastic pools, expose live cluster capacity on the runtime dashboard, and retire the legacy asynq.concurrency setting.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/Tencent/WeKnora/internal/config"
|
||||
"github.com/Tencent/WeKnora/internal/types"
|
||||
"github.com/hibiken/asynq"
|
||||
@@ -15,3 +17,11 @@ func documentProcessTaskOptions(cfg *config.Config, extra ...asynq.Option) []asy
|
||||
opts = append(opts, extra...)
|
||||
return opts
|
||||
}
|
||||
|
||||
func knowledgePostProcessTaskOptions() []asynq.Option {
|
||||
return []asynq.Option{
|
||||
asynq.Queue(types.QueuePostProcess),
|
||||
asynq.MaxRetry(3),
|
||||
asynq.Timeout(30 * time.Minute),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user