From fd4283c531816b9f4b4515998958b65ed49784ae Mon Sep 17 00:00:00 2001 From: trunglt251292 Date: Wed, 16 Feb 2022 17:56:59 +0700 Subject: [PATCH] [Update] Check valid time duration --- task.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/task.go b/task.go index 966bf66..541820c 100644 --- a/task.go +++ b/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)) }