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