feat: implement V2 alert center and scoped alert governance
This commit is contained in:
@@ -217,7 +217,13 @@ func (e *TaskExecutor) runMethod(ctx context.Context, task *taskbiz.TimedTask) e
|
||||
}
|
||||
for attempt := 0; attempt <= options.MaxRetryTimes; attempt++ {
|
||||
err = e.runMethodAttempt(ctx, task, method, options.Timeout)
|
||||
if err == nil || ctx.Err() != nil || errors.Is(err, context.Canceled) || e.methodOrphaned(task.ID) {
|
||||
if ctxErr := ctx.Err(); ctxErr != nil {
|
||||
if errors.Is(ctxErr, context.DeadlineExceeded) {
|
||||
return errTaskTimeout
|
||||
}
|
||||
return ctxErr
|
||||
}
|
||||
if err == nil || errors.Is(err, context.Canceled) || e.methodOrphaned(task.ID) {
|
||||
return err
|
||||
}
|
||||
if attempt < options.MaxRetryTimes {
|
||||
|
||||
Reference in New Issue
Block a user