1
This commit is contained in:
parent
8c9bb7b4fb
commit
81096dfd21
@ -25,6 +25,7 @@ func (this* webHook) unInit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this* webHook) loadWebHookEvent(eventName string, cb func(ds *f5.DataSet) bool) {
|
func (this* webHook) loadWebHookEvent(eventName string, cb func(ds *f5.DataSet) bool) {
|
||||||
|
lastOutTick := q5.GetTickCount()
|
||||||
var lastSyncIdx = this.getLastIdx(eventName)
|
var lastSyncIdx = this.getLastIdx(eventName)
|
||||||
for true {
|
for true {
|
||||||
if lastSyncIdx < 0 {
|
if lastSyncIdx < 0 {
|
||||||
@ -60,6 +61,10 @@ func (this* webHook) loadWebHookEvent(eventName string, cb func(ds *f5.DataSet)
|
|||||||
this.saveLastIdx(eventName, lastSyncIdx)
|
this.saveLastIdx(eventName, lastSyncIdx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if q5.GetTickCount() - lastOutTick > 1000 * 15 {
|
||||||
|
lastOutTick = q5.GetTickCount()
|
||||||
|
f5.GetSysLog().Info("webhook %s last_idx:%d", eventName, lastSyncIdx)
|
||||||
|
}
|
||||||
time.Sleep(time.Second * 3)
|
time.Sleep(time.Second * 3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user