fix(card_sender): 修正延迟等待时间
- 在原有30秒等待基础上增加了2秒额外等待时间 - 确保处理间隔时间更准确,减少请求冲突风险 - 优化提交数据前的时间控制逻辑
This commit is contained in:
@@ -149,7 +149,7 @@ func (s *SendCardTaskTypeFlyFishV2) HandleSendCardTask(ctx context.Context, orde
|
||||
}
|
||||
|
||||
if time.Now().Sub(orderItem.CreateTime) <= time.Second*30 {
|
||||
time.Sleep(time.Second*30 - time.Now().Sub(orderItem.CreateTime))
|
||||
time.Sleep(time.Second*30 - time.Now().Sub(orderItem.CreateTime) + time.Second*2)
|
||||
}
|
||||
span.AddEvent("start submit data")
|
||||
resp, err := webClient.R().SetContext(ctx).SetFormData(formData).Post("https://ccfy.cardpay.fyi/submitcard")
|
||||
|
||||
Reference in New Issue
Block a user