2
0
mirror of https://github.com/hibiken/asynq.git synced 2026-05-02 18:05:51 +08:00

Minor fixes

This commit is contained in:
Ken Hibino
2019-11-21 20:22:55 -08:00
parent 66930970f9
commit c84287d7ab
3 changed files with 7 additions and 3 deletions

View File

@@ -36,6 +36,7 @@ func (p *poller) terminate() {
p.done <- struct{}{}
}
// start starts the "poller" goroutine.
func (p *poller) start() {
go func() {
for {
@@ -65,6 +66,7 @@ func (p *poller) exec() {
fmt.Printf("[DEBUG] got %d tasks from %q\n", len(msgs), zset)
for _, m := range msgs {
// TODO(hibiken): Make this move operation atomic.
if err := p.rdb.move(zset, m); err != nil {
log.Printf("could not move task %+v to queue %q: %v", m, m.Queue, err)
continue