让超时时间设置成60秒

This commit is contained in:
2026-06-21 17:06:40 +08:00
parent 5f960daf78
commit 3f21f7a7d6
6 changed files with 44 additions and 14 deletions

View File

@@ -208,7 +208,7 @@ func (h *PollingRealnameHandler) triggerFirstRealnameActivation(ctx context.Cont
}
task := asynq.NewTask(constants.TaskTypePackageFirstActivation, payloadBytes,
asynq.MaxRetry(3),
asynq.Timeout(30*time.Second),
asynq.Timeout(60*time.Second),
asynq.Queue(constants.QueueForTaskType(constants.TaskTypePackageFirstActivation)),
)
if _, err := h.asynqClient.EnqueueContext(ctx, task); err != nil {
@@ -246,7 +246,7 @@ func (h *PollingRealnameHandler) triggerDeviceRealnameActivation(ctx context.Con
}
task := asynq.NewTask(constants.TaskTypePackageFirstActivation, payloadBytes,
asynq.MaxRetry(3),
asynq.Timeout(30*time.Second),
asynq.Timeout(60*time.Second),
asynq.Queue(constants.QueueForTaskType(constants.TaskTypePackageFirstActivation)),
)
if _, err := h.asynqClient.EnqueueContext(ctx, task); err != nil {