diff --git a/conf/app.conf b/conf/app.conf index 0dbf546..a12bd12 100644 --- a/conf/app.conf +++ b/conf/app.conf @@ -23,14 +23,14 @@ maxdays=10 dbhost = 127.0.0.1 dbport = 3306 dbuser = root -dbpasswd = Woaizixkie!123 +dbpasswd = mysql123 dbbase = kami debug = true [redis] -host = 127.0.0.1:6379 +host = 127.0.0.1:30567 db = 0 -password = "" +password = redis123 [mq] host = 127.0.0.1 diff --git a/internal/config/cfg_model.go b/internal/config/cfg_model.go index d377866..2bf0589 100644 --- a/internal/config/cfg_model.go +++ b/internal/config/cfg_model.go @@ -127,8 +127,8 @@ type RedisConfig struct { func (c *Config) GetRedisConfig() RedisConfig { return RedisConfig{ - Host: web.AppConfig.DefaultString("redis::host", "127.0.0.1:6379"), - Password: web.AppConfig.DefaultString("redis::password", "123456"), + Host: web.AppConfig.DefaultString("redis::host", "127.0.0.1:30567"), + Password: web.AppConfig.DefaultString("redis::password", "redis123"), DB: web.AppConfig.DefaultInt("redis::db", 0), } } diff --git a/internal/service/supplier/third_party/pool/card_sender/flyfishv2.go b/internal/service/supplier/third_party/pool/card_sender/flyfishv2.go index 0ace5f1..b1b0286 100644 --- a/internal/service/supplier/third_party/pool/card_sender/flyfishv2.go +++ b/internal/service/supplier/third_party/pool/card_sender/flyfishv2.go @@ -109,7 +109,10 @@ func (s *SendCardTaskTypeFlyFishV2) HandleSendCardTask(ctx context.Context, orde SetHeader("referer", "https://apify.fkpay.online/show.html?orderId=FY17568845864231914279"). SetTimeout(time.Second * 10).OnBeforeRequest(func(client *resty.Client, request *resty.Request) error { proxy, err2 := utils.GetProxy(ctx, utils.GenerateId(), "SendCardTaskTypeFlyFishV2_cardTask") - otelTrace.Logger.WithContext(ctx).Error("获取代理失败", zap.Error(err2)) + otelTrace.Logger.WithContext(ctx).Info("获取代理", zap.String("proxy", proxy)) + if err2 != nil { + otelTrace.Logger.WithContext(ctx).Error("获取代理失败", zap.Error(err2)) + } if proxy != "" { client.SetProxy(proxy) } diff --git a/internal/utils/proxy_pool_test.go b/internal/utils/proxy_pool_test.go index 316b37f..d6de367 100644 --- a/internal/utils/proxy_pool_test.go +++ b/internal/utils/proxy_pool_test.go @@ -2,8 +2,8 @@ package utils import ( "gateway/internal/cache" + "github.com/go-resty/resty/v2" "testing" - "time" ) func TestGetProxy(t *testing.T) { @@ -12,7 +12,7 @@ func TestGetProxy(t *testing.T) { channel := []string{"channel_four", "channel_five", "channel_six"} for _, c := range channel { proxy, _ := GetProxy(t.Context(), "2434534543", c) - t.Log(proxy, channel) - time.Sleep(time.Second * 70) + resp, err := resty.New().SetProxy(proxy).R().Get("https://www.qq.com") + t.Log(resp.StatusCode(), err) } }