错开同步时间
This commit is contained in:
@@ -45,6 +45,9 @@ var (
|
||||
dailyWorkTimeList = []string{
|
||||
"22:00:00",
|
||||
}
|
||||
dailyWorkTimeList2 = []string{
|
||||
"23:00:00",
|
||||
}
|
||||
priceReferTimeList = []string{
|
||||
"01:00:00",
|
||||
}
|
||||
@@ -158,6 +161,8 @@ func Init() {
|
||||
if globals.IsProductEnv() {
|
||||
ScheduleTimerFunc("doDailyWork", doDailyWork, dailyWorkTimeList)
|
||||
|
||||
ScheduleTimerFunc("doDailyWork2", doDailyWork2, dailyWorkTimeList2)
|
||||
|
||||
ScheduleTimerFuncByInterval(func() {
|
||||
orderman.SaveJdsOrders(jxcontext.AdminCtx, time.Now().Add(-5*time.Minute), time.Now())
|
||||
}, 5*time.Second, 5*time.Minute)
|
||||
@@ -375,6 +380,13 @@ func syncStoreSku() {
|
||||
tasksch.HandleTask(task, nil, true).Run()
|
||||
}
|
||||
|
||||
func doDailyWork2() {
|
||||
globals.SugarLogger.Debug("doDailyWork2")
|
||||
|
||||
//同步京东商城门店库存和商品
|
||||
cms.CurVendorSync.SyncJdsStoresSkus(jxcontext.AdminCtx, nil, true, true)
|
||||
}
|
||||
|
||||
func doDailyWork() {
|
||||
globals.SugarLogger.Debug("doDailyWork")
|
||||
|
||||
@@ -405,8 +417,6 @@ func doDailyWork() {
|
||||
cms.CurVendorSync.SyncStoreSkusFromYb(jxcontext.AdminCtx, nil, true, true)
|
||||
//刷新京东商城订单结算价
|
||||
orderman.RefreshJdShopOrdersEarningPrice(jxcontext.AdminCtx, time.Now().AddDate(0, 0, -3).Format("20060102"), time.Now().Format("20060102"))
|
||||
//同步京东商城门店库存和商品
|
||||
cms.CurVendorSync.SyncJdsStoresSkus(jxcontext.AdminCtx, nil, true, true)
|
||||
//同步上架京东商城待售商品
|
||||
cms.RefreshJdsSkusStatus(jxcontext.AdminCtx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user