2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-10-23 10:16:12 +08:00

降低等待时长

This commit is contained in:
liujinsuo@mobiexchanger.com
2022-10-10 20:08:52 +08:00
parent c08f142b56
commit a757de9634

View File

@@ -179,7 +179,7 @@ func (p *processor) exec() {
// Sleep to avoid slamming redis and let scheduler move tasks into queues. // Sleep to avoid slamming redis and let scheduler move tasks into queues.
// Note: We are not using blocking pop operation and polling queues instead. // Note: We are not using blocking pop operation and polling queues instead.
// This adds significant load to redis. // This adds significant load to redis.
time.Sleep(time.Second) time.Sleep(time.Millisecond * 100)
<-p.sema // release token <-p.sema // release token
return return
case err != nil: case err != nil: