1
This commit is contained in:
parent
5a5565e2cf
commit
ccf217b321
@ -12,14 +12,14 @@ type taskMgr struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this* taskMgr) Init() {
|
func (this* taskMgr) Init() {
|
||||||
go this.syncOrderUpdatedEvent(constant.ORDER_UPDATE_EVENT)
|
go this.loadWebHookEvent(constant.ORDER_UPDATE_EVENT)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this* taskMgr) UnInit() {
|
func (this* taskMgr) UnInit() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this* taskMgr) syncOrderUpdatedEvent(eventName string) {
|
func (this* taskMgr) loadWebHookEvent(eventName string) {
|
||||||
var lastSyncIdx = this.getLastIdx(eventName)
|
var lastSyncIdx = this.getLastIdx(eventName)
|
||||||
for true {
|
for true {
|
||||||
if lastSyncIdx < 0 {
|
if lastSyncIdx < 0 {
|
||||||
@ -28,7 +28,15 @@ func (this* taskMgr) syncOrderUpdatedEvent(eventName string) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
f5.GetGoStyleDb().RawQuery(
|
||||||
|
constant.BCEVENT_DB,
|
||||||
|
"SELECT * FROM t_webhook_process_last_idx WHERE idx > ?",
|
||||||
|
[]string{
|
||||||
|
q5.ToString(lastSyncIdx),
|
||||||
|
},
|
||||||
|
func (err error, ds *f5.DataSet) {
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
time.Sleep(time.Second * 3)
|
time.Sleep(time.Second * 3)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user