作者 yangfu

fix: 增加生产环境配置

... ... @@ -35,9 +35,9 @@ func SyncProduct(ctx context.Context) error {
log.Logger.Debug("【定时同步同步产品信息】 启动")
pullK3CloudService := syncdata.PullDataK3CloudService{}
t := ctx.Value("fromTime")
var fromTime time.Time
if ctx != nil {
t := ctx.Value("fromTime")
if t != nil {
if v, ok := t.(time.Time); ok {
fromTime = v
... ...
... ... @@ -32,6 +32,7 @@ func newK3cloudClient() (*k3cloud.Client, error) {
)
if constant.SERVICE_ENV == "prd" {
hostUrl = "https://tianlian.ik3cloud.com/k3cloud"
acctID = "20211118121126059"
}
client, err := k3cloud.NewClient(hostUrl, acctID, username, password)
return client, err
... ...