[Update] Check valid time duration
This commit is contained in:
parent
7c1ecfa89c
commit
fd4283c531
2
task.go
2
task.go
|
@ -28,7 +28,7 @@ func (i Instance) RunTask(typename string, payload []byte, priority string, retr
|
|||
options = append(options, asynq.MaxRetry(retryTimes))
|
||||
|
||||
// Task timeout
|
||||
if i.Config.TaskTimeout != 0 {
|
||||
if i.Config.TaskTimeout > 0 {
|
||||
options = append(options, asynq.Timeout(i.Config.TaskTimeout))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue