diff --git a/server/marketserver/task/taskmgr.go b/server/marketserver/task/taskmgr.go index 15baca0a..28ae5d96 100644 --- a/server/marketserver/task/taskmgr.go +++ b/server/marketserver/task/taskmgr.go @@ -12,18 +12,18 @@ type taskMgr struct { } func (this* taskMgr) Init() { - go this.syncOrderUpdatedEvent() + go this.syncOrderUpdatedEvent(constant.ORDER_UPDATE_EVENT) } func (this* taskMgr) UnInit() { } -func (this* taskMgr) syncOrderUpdatedEvent() { - var lastSyncIdx = this.getLastIdx(constant.ORDER_UPDATE_EVENT) +func (this* taskMgr) syncOrderUpdatedEvent(eventName string) { + var lastSyncIdx = this.getLastIdx(eventName) for true { if lastSyncIdx < 0 { - lastSyncIdx = this.getLastIdx(constant.ORDER_UPDATE_EVENT) + lastSyncIdx = this.getLastIdx(eventName) if lastSyncIdx >= 0 { continue }