This commit is contained in:
gazebo
2019-10-15 09:34:15 +08:00
parent a776e144af
commit 58f4668a6e

View File

@@ -1,13 +1,14 @@
package misc
import (
"git.rosy.net.cn/jx-callback/business/jxutils"
"time"
"strings"
"sync"
"time"
"git.rosy.net.cn/baseapi"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
"git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
"git.rosy.net.cn/jx-callback/business/model"
@@ -70,10 +71,11 @@ type StoreListQueueData struct {
locker sync.RWMutex
}
func (s *StoreListQueueData) GetProcessQueue() []*cms.StoreExt {
func (s *StoreListQueueData) GetProcessQueue() (outQueue []*cms.StoreExt) {
s.locker.RLock()
defer s.locker.RUnlock()
return s.processQueue
outQueue = append(outQueue, s.processQueue...)
return outQueue
}
func (s *StoreListQueueData) InsertToWaitQueue(storeInfo *cms.StoreExt) {
@@ -293,6 +295,7 @@ func StartOrEndOpStoreEx(ctx *jxcontext.Context, isStart bool, startTime, endTim
func IsJXCS() bool {
return globals.IsMainProductEnv()
}
// func GetVendorStoreRefreshTime(vendorID int) (startTimeList, stopTimeList []string) {
// isJXCS := globals.IsMainProductEnv()
// refreshTimeList := vendorStoreRefreshTimeList[vendorID]
@@ -374,7 +377,7 @@ func InitEx() {
value.TransferWaitQueueToProcessQueue()
}
}
PeriodlyCall(time.Second, periodlyFunc)
PeriodlyCall(60*time.Second, periodlyFunc)
}
return result, err
}