2
0
mirror of https://github.com/hibiken/asynq.git synced 2026-04-21 01:25:50 +08:00

Minor improvements

This commit is contained in:
Ken Hibino
2019-12-04 16:56:10 -08:00
parent 998e761660
commit afacc31990
4 changed files with 5 additions and 6 deletions

View File

@@ -87,7 +87,7 @@ func (p *processor) exec() {
// the message can be mutated by the time this function is called.
defer func(msg rdb.TaskMessage) {
if err := p.rdb.Done(&msg); err != nil {
log.Printf("[ERROR] could not remove %+v from %q: %v\n", msg, rdb.InProgress, err)
log.Printf("[ERROR] could not mark task %+v as done: %v\n", msg, err)
}
<-p.sema // release token
}(*msg)
@@ -103,7 +103,7 @@ func (p *processor) exec() {
func (p *processor) restore() {
err := p.rdb.RestoreUnfinished()
if err != nil {
log.Printf("[ERROR] could not move tasks from %q to %q\n", rdb.InProgress, rdb.DefaultQueue)
log.Printf("[ERROR] could not restore unfinished tasks: %v\n", err)
}
}