Put the provider pool on the background refresh timer at startup #4
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/pool-refresh-on-start"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR #2 added a 5-minute timer that refreshes addons used in the last 7 days, but an addon only joined it after serving a catalog. The set lives in memory, so every restart (including every autodeploy) emptied it. If nobody opened a catalog after a restart, the pool went back to refreshing only on request and its guides went stale again.
createPoolAddonnow callsmarkUsed(pool)right after the initial load, so the pool is on the timer from the moment the server starts. Refresh frequency is unchanged: the pool still refreshes only whenneedsRefreshsays its data is due (hourly withEPG_REFRESH_MS). Per-user token addons are unchanged and still join the timer on their first catalog request.Tested in the running container by building the pool through
createPoolAddonwith every refresh stubbed, so no providers were contacted. The pool is on the timer straight after startup with no catalog request, a fresh pool is skipped, and a stale one is refreshed. The same test fails on current main.