This commit is contained in:
aozhiwei 2024-06-26 21:52:21 +08:00
parent 8c9bb7b4fb
commit 81096dfd21

View File

@ -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)
} }
} }