mirror of
https://github.com/grassrootseconomics/cic-custodial.git
synced 2025-04-09 19:41:00 +02:00
parent
6713f0f3ae
commit
1392c03ab0
@ -3,6 +3,7 @@ package server
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/bsm/redislock"
|
||||||
"github.com/grassrootseconomics/cic-custodial/internal/actions"
|
"github.com/grassrootseconomics/cic-custodial/internal/actions"
|
||||||
tasker_client "github.com/grassrootseconomics/cic-custodial/internal/tasker/client"
|
tasker_client "github.com/grassrootseconomics/cic-custodial/internal/tasker/client"
|
||||||
"github.com/hibiken/asynq"
|
"github.com/hibiken/asynq"
|
||||||
@ -47,6 +48,14 @@ func NewTaskerServer(o Opts) *TaskerServer {
|
|||||||
return asynq.DefaultRetryDelayFunc(n, e, t)
|
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