2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-08-19 15:08:55 +08:00

Limit the number of tasks moved by CheckAndEnqueue to prevent a long

running script
This commit is contained in:
Ken Hibino
2020-06-07 13:04:27 -07:00
parent 8af4cbad51
commit 06c4a1c7f8
13 changed files with 91 additions and 105 deletions

View File

@@ -251,7 +251,7 @@ type Broker interface {
Retry(msg *TaskMessage, processAt time.Time, errMsg string) error
Kill(msg *TaskMessage, errMsg string) error
RequeueAll() (int64, error)
CheckAndEnqueue(qnames ...string) error
CheckAndEnqueue() error
WriteServerState(info *ServerInfo, workers []*WorkerInfo, ttl time.Duration) error
ClearServerState(host string, pid int, serverID string) error
CancelationPubSub() (*redis.PubSub, error) // TODO: Need to decouple from redis to support other brokers