shenjiachi преди 6 дни
родител
ревизия
b6756092d1
променени са 2 файла, в които са добавени 16 реда и са изтрити 16 реда
  1. +8
    -8
      app/task/svc/svc_egg_energy_deal_fund_data.go
  2. +8
    -8
      app/task/svc/svc_egg_energy_deal_platform_revenue_data.go

+ 8
- 8
app/task/svc/svc_egg_energy_deal_fund_data.go Целия файл

@@ -19,11 +19,18 @@ func EggEnergyDealFundData(eg *xorm.Engine) {
fmt.Println("egg_energy_deal_fund_data...")
defer func() {
if err := recover(); err != nil {
fmt.Println(err)
fmt.Println("DealFundDataGetRabbitChannel_ERR:::::", err)
return
}
}()

ch, err := rabbit.Cfg.Pool.GetChannel()
if err != nil {
fmt.Println("DealFundDataGetRabbitChannel_ERR:::::", err.Error())
return
}
defer ch.Release()

// 悲观锁防止串行
getString, _ := cache.GetString(EggEnergyDealFundDataKey)
if getString != "" {
@@ -41,13 +48,6 @@ func EggEnergyDealFundData(eg *xorm.Engine) {
return
}

ch, err := rabbit.Cfg.Pool.GetChannel()
if err != nil {
fmt.Println("DealFundDataGetRabbitChannel_ERR:::::", err.Error())
return
}
defer ch.Release()

now := time.Now()
fundDataRecordsDb := implement.NewEggEnergyFundDataRecordsDb(eg)
for _, data := range fundDataList {


+ 8
- 8
app/task/svc/svc_egg_energy_deal_platform_revenue_data.go Целия файл

@@ -19,11 +19,18 @@ func EggEnergyDealPlatformRevenueData(eg *xorm.Engine) {
fmt.Println("egg_energy_deal_platform_revenue_data...")
defer func() {
if err := recover(); err != nil {
fmt.Println(err)
fmt.Println("EggEnergyDealPlatformRevenueDataGetRabbitChannel_ERR:::::", err)
return
}
}()

ch, err := rabbit.Cfg.Pool.GetChannel()
if err != nil {
fmt.Println("EggEnergyDealPlatformRevenueDataGetRabbitChannel_ERR:::::", err.Error())
return
}
defer ch.Release()

// 悲观锁防止串行
getString, _ := cache.GetString(EggEnergyDealPlatformRevenueDataKey)
if getString != "" {
@@ -41,13 +48,6 @@ func EggEnergyDealPlatformRevenueData(eg *xorm.Engine) {
return
}

ch, err := rabbit.Cfg.Pool.GetChannel()
if err != nil {
fmt.Println("EggEnergyDealPlatformRevenueDataGetRabbitChannel_ERR:::::", err.Error())
return
}
defer ch.Release()

now := time.Now()
recordsDb := implement.NewPlatformRevenueDataRecordsDb(eg)
for _, data := range platformRevenueDataList {


Зареждане…
Отказ
Запис