NSCv3: improve scheduling

This commit is contained in:
Milos Kozak 2023-02-19 20:47:15 +01:00
parent a608f55f31
commit c4b9b22ab9

View file

@ -239,9 +239,9 @@ class NSClientV3Plugin @Inject constructor(
if (it is ValueWrapper.Existing) {
if (it.value.timestamp < dateUtil.now() - T.mins(5).plus(T.secs(20)).msecs()) {
refreshInterval = T.mins(1).msecs()
executeLoop("MAIN_LOOP", forceNew = false)
executeLoop("MAIN_LOOP", forceNew = true)
}
} else executeLoop("MAIN_LOOP", forceNew = false)
} else executeLoop("MAIN_LOOP", forceNew = true)
}
handler.postDelayed(runLoop, refreshInterval)
rxBus.send(EventNSClientNewLog("● TICK", ""))