Check for number of workers before soft failing the task. #104195
@ -188,7 +188,7 @@ func (f *Flamenco) onTaskFailed(
|
|||||||
Int("threshold", threshold).
|
Int("threshold", threshold).
|
||||||
Logger()
|
Logger()
|
||||||
|
|
||||||
Nitin-Rawat-1 marked this conversation as resolved
Outdated
|
|||||||
if numFailed > threshold {
|
if numFailed >= threshold {
|
||||||
return f.hardFailTask(ctx, logger, worker, task, numFailed)
|
return f.hardFailTask(ctx, logger, worker, task, numFailed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user
If you flip this condition, you can return early and reduce the nesting level of the following code.