mirror of
https://github.com/go-task/task.git
synced 2025-11-25 22:32:55 +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 {
|
if !ok {
|
||||||
return &taskNotFoundError{call.Task}
|
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}
|
return &MaximumTaskCallExceededError{task: call.Task}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user