[Update] Add task timeout #1

Merged
trunglt251292 merged 3 commits from update-config-task-timeout into master 2022-02-16 10:58:09 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit fd4283c531 - Show all commits

View File

@ -28,7 +28,7 @@ func (i Instance) RunTask(typename string, payload []byte, priority string, retr
options = append(options, asynq.MaxRetry(retryTimes)) options = append(options, asynq.MaxRetry(retryTimes))
// Task timeout // Task timeout
if i.Config.TaskTimeout != 0 { if i.Config.TaskTimeout > 0 {
options = append(options, asynq.Timeout(i.Config.TaskTimeout)) options = append(options, asynq.Timeout(i.Config.TaskTimeout))
} }