-
Notifications
You must be signed in to change notification settings - Fork 36
retry
gojuukaze edited this page Jul 13, 2020
·
1 revision
- use panic
func add(a, b int){
panic("xx")
}
- use TaskCtl
func add(ctl *controller.TaskCtl,a, b int){
ctl.Retry(errors.New("xx"))
return
}
Default retry count is 3
- in client
client.SetTaskCtl(client.RetryCount, 5).Send("group1", "retry", 123, 44)
- in server
func add(ctl *controller.TaskCtl,a, b int){
ctl.SetRetryCount(0)
return
}
- in client
client.SetTaskCtl(client.RetryCount, 0).Send("group1", "retry", 123, 44)