🐛 邮件只重试一次

This commit is contained in:
sugarBecomer
2025-12-08 10:47:57 +08:00
parent 02737ef743
commit b068e178da
+1 -1
View File
@@ -143,7 +143,7 @@ func (s *EmailServiceV1) sendEmail(ctx context.Context, to, subject, body string
utils.OkOrPanic(e, oops.WithContext(ctx).Wrap)
task := queue.AddTask(ctx, asynq.NewTask(cst2.TaskEmail, payload.Bytes()), asynq.Queue(cst2.TaskQueueEmail),
asynq.MaxRetry(3),
asynq.MaxRetry(1),
asynq.Timeout(5*time.Minute),
)
logger.Logger.Info("添加任务: ", zap.String("task_id", task.ID), zap.String("邮箱", to))