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:
2
task.go
2
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}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user