Change Background API to take Handler interface

This commit is contained in:
Ken Hibino
2019-12-02 20:42:21 -08:00
parent 1a996e0d40
commit b0a54cd2b2
5 changed files with 34 additions and 13 deletions

View File

@@ -59,7 +59,7 @@ func main() {
Addr: "localhost:6379",
})
bg.Run(handler)
bg.Run(asynq.HandlerFunc(handler))
}
// if handler returns an error or panics, the task will be retried after some delay.