🐛 修改定时任务信息

This commit is contained in:
sugarBecomer
2025-11-17 12:39:05 +08:00
parent 1ea9170d89
commit 5cd8329519
4 changed files with 9 additions and 5 deletions
+5 -1
View File
@@ -44,4 +44,8 @@ bucket = "likedream"
[cpdaily]
appVersion = "9.7.2"
systemVersion = "iOS 17"
calVersion = "firstv"
calVersion = "firstv"
[task]
concurrency = 20
+2 -2
View File
@@ -157,11 +157,11 @@ func (c *CpdailyCasLogin) Login(ctx context.Context, schoolDetail *school.School
allInputs[name] = value
}
} else {
utils.OkOrPanic(oops.With("schoolDetail", schoolDetail).
utils.OkOrPanic(errors.NewBusinessError(503, "页面中未找到登录表单"), oops.With("schoolDetail", schoolDetail).
With("username", username).
With("password", password).
WithContext(ctx).
Wrap(errors.NewBusinessError(503, "页面中未找到登录表单")))
Wrap)
}
// 修改部分参数
+1 -1
View File
@@ -123,7 +123,7 @@ func (ts *TaskScanner) scanCpdailyTask() {
e = utils.Catch(func() {
queue.AddTask(ts.ctx, asynq.NewTask(cst2.TaskCpdaily, payloadWriter.Bytes()),
asynq.Unique(20*time.Minute),
asynq.Unique(5*time.Minute),
asynq.MaxRetry(4),
asynq.ProcessAt(execTime),
asynq.Timeout(10*time.Minute),
+1 -1
View File
@@ -26,7 +26,7 @@ func initServer(ctx context.Context) {
RetryDelayFunc: func(n int, _ error, _ *asynq.Task) time.Duration {
return time.Duration(n) * 2 * time.Second
},
DelayedTaskCheckInterval: 10 * time.Second,
DelayedTaskCheckInterval: 2 * time.Second,
ErrorHandler: taskErrorHandler{},
Queues: map[string]int{
cst2.TaskQueueEmail: 2,