mirror of
https://github.com/grassrootseconomics/cic-custodial.git
synced 2025-04-07 03:11:00 +02:00
parent
6713f0f3ae
commit
1392c03ab0
@ -3,6 +3,7 @@ package server
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/bsm/redislock"
|
||||
"github.com/grassrootseconomics/cic-custodial/internal/actions"
|
||||
tasker_client "github.com/grassrootseconomics/cic-custodial/internal/tasker/client"
|
||||
"github.com/hibiken/asynq"
|
||||
@ -47,6 +48,14 @@ func NewTaskerServer(o Opts) *TaskerServer {
|
||||
return asynq.DefaultRetryDelayFunc(n, e, t)
|
||||
}
|
||||
},
|
||||
IsFailure: func(err error) bool {
|
||||
switch err {
|
||||
case redislock.ErrNotObtained:
|
||||
return false
|
||||
default:
|
||||
return true
|
||||
}
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user