新增 订单回调失败最大重试次数 配置项
This commit is contained in:
+2
-1
@@ -70,6 +70,7 @@ api_auth_token=
|
||||
|
||||
#订单过期时间(单位分钟)
|
||||
order_expiration_time=10
|
||||
|
||||
#订单回调失败最大重试次数
|
||||
order_notice_max_retry=0
|
||||
#强制汇率(设置此参数后每笔交易将按照此汇率计算,例如:6.4)
|
||||
forced_usdt_rate=
|
||||
@@ -2,6 +2,9 @@ package service
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"sync"
|
||||
|
||||
"github.com/assimon/luuu/model/data"
|
||||
"github.com/assimon/luuu/model/request"
|
||||
"github.com/assimon/luuu/mq"
|
||||
@@ -14,8 +17,6 @@ import (
|
||||
"github.com/gookit/goutil/stdutil"
|
||||
"github.com/hibiken/asynq"
|
||||
"github.com/shopspring/decimal"
|
||||
"net/http"
|
||||
"sync"
|
||||
)
|
||||
|
||||
const UsdtTrc20ApiUri = "https://apilist.tronscanapi.com/api/transfer/trc20"
|
||||
@@ -135,7 +136,10 @@ func Trc20CallBack(token string, wg *sync.WaitGroup) {
|
||||
}
|
||||
// 回调队列
|
||||
orderCallbackQueue, _ := handle.NewOrderCallbackQueue(order)
|
||||
mq.MClient.Enqueue(orderCallbackQueue, asynq.MaxRetry(5))
|
||||
orderCallbackQueue, _ := handle.NewOrderCallbackQueue(order)
|
||||
orderNoticeMaxRetry := viper.GetInt("order_notice_max_retry")
|
||||
mq.MClient.Enqueue(orderCallbackQueue, asynq.MaxRetry(orderNoticeMaxRetry))
|
||||
// mq.MClient.Enqueue(orderCallbackQueue, asynq.MaxRetry(5))
|
||||
// 发送机器人消息
|
||||
msgTpl := `
|
||||
<b>📢📢有新的交易支付成功!</b>
|
||||
|
||||
Reference in New Issue
Block a user