From e765b7a9c4e8091e8ce5739270c72fb8b2ba2f68 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Sat, 5 Aug 2017 13:26:30 -0300 Subject: [PATCH] do not check for maximum call if is watch --- task.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/task.go b/task.go index ecc82d1f..e791819e 100644 --- a/task.go +++ b/task.go @@ -113,7 +113,7 @@ func (e *Executor) RunTask(ctx context.Context, call Call) error { if !ok { return &taskNotFoundError{call.Task} } - if atomic.AddInt32(e.taskCallCount[call.Task], 1) >= MaximumTaskCall { + if !e.Watch && atomic.AddInt32(e.taskCallCount[call.Task], 1) >= MaximumTaskCall { return &MaximumTaskCallExceededError{task: call.Task} }