This commit is contained in:
aozhiwei 2024-06-14 15:10:59 +08:00
parent 467af263c0
commit 5a5565e2cf

View File

@ -12,18 +12,18 @@ type taskMgr struct {
} }
func (this* taskMgr) Init() { func (this* taskMgr) Init() {
go this.syncOrderUpdatedEvent() go this.syncOrderUpdatedEvent(constant.ORDER_UPDATE_EVENT)
} }
func (this* taskMgr) UnInit() { func (this* taskMgr) UnInit() {
} }
func (this* taskMgr) syncOrderUpdatedEvent() { func (this* taskMgr) syncOrderUpdatedEvent(eventName string) {
var lastSyncIdx = this.getLastIdx(constant.ORDER_UPDATE_EVENT) var lastSyncIdx = this.getLastIdx(eventName)
for true { for true {
if lastSyncIdx < 0 { if lastSyncIdx < 0 {
lastSyncIdx = this.getLastIdx(constant.ORDER_UPDATE_EVENT) lastSyncIdx = this.getLastIdx(eventName)
if lastSyncIdx >= 0 { if lastSyncIdx >= 0 {
continue continue
} }