Refresh recently used addons in the background #2
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/background-refresh"
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?
Data only refreshed when someone opened a catalog, and the catalog was served from whatever was cached before the refresh finished. After two quiet days (last refresh Oct 7 1:33 PM), the first Live Now on Oct 9 was built from 2-day-old guides and showed 2 events. It showed 100 once the refresh finished a few minutes later.
Any addon that serves a catalog is now added to a set. Every 5 minutes, addons in that set refresh if their data is due (the same
needsRefreshcheck as before, so still hourly withEPG_REFRESH_MS). The tick also starts the ESPN scoreboard refresh when it's stale. An addon that hasn't been opened in 7 days drops out of the set and goes back to refreshing only when it's opened, so old configs don't keep hitting providers.Tested in the running container with stand-in addons and the real pool loaded from Redis, without contacting providers: a stale addon is refreshed, a fresh one and one idle for over 7 days are not, an idle one rejoins when opened, and the pool refreshes only once its data is over an hour old.