1
0
mirror of https://github.com/go-task/task.git synced 2025-09-16 09:26:16 +02:00

do not check for maximum call if is watch

This commit is contained in:
Andrey Nering
2017-08-05 13:26:30 -03:00
parent c210e34ce3
commit e765b7a9c4

View File

@@ -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}
}