|
@@ -42,7 +42,7 @@ func DailySettlementBlockGreenChain(engine *xorm.Engine, mid string, isTask bool |
|
|
today := now.Format("2006-01-02") |
|
|
today := now.Format("2006-01-02") |
|
|
|
|
|
|
|
|
fmt.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", now.Hour()) |
|
|
fmt.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", now.Hour()) |
|
|
if isTask && (now.Hour() > 8) { |
|
|
|
|
|
|
|
|
if isTask && (now.Hour() > 22) && (now.Hour() < 24) { |
|
|
//TODO::只在凌晨一点 ~ 凌晨 8 点运行 |
|
|
//TODO::只在凌晨一点 ~ 凌晨 8 点运行 |
|
|
return errors.New("非运行时间") |
|
|
return errors.New("非运行时间") |
|
|
} |
|
|
} |
|
@@ -79,7 +79,7 @@ func DailySettlementBlockGreenChain(engine *xorm.Engine, mid string, isTask bool |
|
|
fmt.Println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", "上一次结算未执行完") |
|
|
fmt.Println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", "上一次结算未执行完") |
|
|
return errors.New("上一次结算未执行完") |
|
|
return errors.New("上一次结算未执行完") |
|
|
} |
|
|
} |
|
|
cache.SetEx(PessimismLockKeyForGreen, PessimismLockValueForGreen, 3600*8) //8小时 |
|
|
|
|
|
|
|
|
cache.SetEx(PessimismLockKeyForGreen, PessimismLockValueForGreen, 3600*1) //8小时 |
|
|
|
|
|
|
|
|
//TODO::关闭系统 |
|
|
//TODO::关闭系统 |
|
|
zhios_order_relate_utils.CurlPost("http://zhios-app:5000/api/v1/check_app_over_time", map[string]string{ |
|
|
zhios_order_relate_utils.CurlPost("http://zhios-app:5000/api/v1/check_app_over_time", map[string]string{ |
|
@@ -214,7 +214,7 @@ func DailySettlementBlockGreenChain(engine *xorm.Engine, mid string, isTask bool |
|
|
"is_close": "0", |
|
|
"is_close": "0", |
|
|
}, map[string]string{}) |
|
|
}, map[string]string{}) |
|
|
|
|
|
|
|
|
//cache.Del(PessimismLockKeyForGreen) |
|
|
|
|
|
|
|
|
cache.Del(PessimismLockKeyForGreen) |
|
|
|
|
|
|
|
|
fmt.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>绿色积分结束<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<") |
|
|
fmt.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>绿色积分结束<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<") |
|
|
return nil |
|
|
return nil |
|
|