This commit is contained in:
doms9 2025-12-27 10:25:35 -05:00
parent 7b48b92660
commit 00000d979f
5 changed files with 10 additions and 0 deletions

View file

@ -21,6 +21,8 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
events = []
if not (api_data := API_FILE.load(per_entry=False)):
log.info("Refreshing API cache")
api_data = {}
if r := await network.request(

View file

@ -25,6 +25,8 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
now = Time.clean(Time.now())
if not (api_data := API_CACHE.load(per_entry=False)):
log.info("Refreshing API cache")
api_data = {}
if r := await network.request(BASE_URL, log=log):

View file

@ -31,6 +31,8 @@ async def get_events(api_url: str, cached_keys: list[str]) -> list[dict[str, str
events = []
if not (api_data := API_FILE.load(per_entry=False)):
log.info("Refreshing API cache")
api_data = {}
if r := await network.request(api_url, log=log):

View file

@ -35,6 +35,8 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
now = Time.clean(Time.now())
if not (api_data := API_FILE.load(per_entry=False, index=-1)):
log.info("Refreshing API cache")
api_data = []
if r := await network.request(

View file

@ -37,6 +37,8 @@ async def get_events(url: str, cached_keys: list[str]) -> list[dict[str, str]]:
now = Time.clean(Time.now())
if not (api_data := API_FILE.load(per_entry=False, index=-1)):
log.info("Refreshing API cache")
api_data = []
if r := await network.request(