Skip to content

Commit 80c9e8d

Browse files
committed
fix lint
1 parent fb4e7f3 commit 80c9e8d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

modules/task/queue_redis.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ func (r *RedisQueue) Run() error {
9090
select {
9191
case <-r.closeChan:
9292
return nil
93+
case <-time.After(time.Millisecond * 100):
9394
}
9495

9596
bs, err := r.client.LPop(r.queueName).Bytes()
@@ -111,8 +112,6 @@ func (r *RedisQueue) Run() error {
111112
log.Error("Run task failed: %s", err.Error())
112113
}
113114
}
114-
115-
time.Sleep(time.Millisecond * 100)
116115
}
117116
}
118117

0 commit comments

Comments
 (0)