修复重构后逻辑问题
This commit is contained in:
@@ -2,11 +2,13 @@ package globals
|
||||
|
||||
import (
|
||||
"github.com/hibiken/asynq"
|
||||
"github.com/redis/go-redis/v9"
|
||||
)
|
||||
|
||||
var Asynq *asynq.Client
|
||||
|
||||
func initAsynq() {
|
||||
var client = asynq.NewClientFromRedisClient(Redis)
|
||||
func initAsynq(redis *redis.Client) error {
|
||||
var client = asynq.NewClientFromRedisClient(redis)
|
||||
Asynq = client
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ func Init(ctx context.Context) error {
|
||||
errs = append(errs, initValidator())
|
||||
errs = append(errs, initRedis())
|
||||
errs = append(errs, initOrm())
|
||||
errs = append(errs, initAsynq(Redis))
|
||||
errs = append(errs, initProxy())
|
||||
errs = append(errs, initSft())
|
||||
|
||||
|
||||
@@ -358,7 +358,7 @@ func (s *SftClient) verify(str []byte) (string, error) {
|
||||
}
|
||||
|
||||
if resp.Code != "000000" {
|
||||
return "", fmt.Errorf("请求业务响应失败: %s", u.Z(resp.Msg))
|
||||
return "", fmt.Errorf("接口的响应为失败: %s", u.Z(resp.Msg))
|
||||
}
|
||||
|
||||
if resp.Sign == nil {
|
||||
|
||||
Reference in New Issue
Block a user