Improve caching system

This commit is contained in:
Jules 2020-10-30 13:18:10 +01:00
parent 9c61cc6234
commit 3b653f7bdc

View file

@ -76,7 +76,10 @@ def background_cache() -> None:
for entry in config: for entry in config:
if 'cache' in entry and entry['cache']: if 'cache' in entry and entry['cache']:
cache(entry) try:
cache(entry)
except:
print("Could not cache", entry)
print('Cache renewed', arrow.now().format("YYYY-MM-DD HH:mm:ss")) print('Cache renewed', arrow.now().format("YYYY-MM-DD HH:mm:ss"))
@ -88,4 +91,4 @@ class CacheThread(threading.Thread):
print("Starting cache process") print("Starting cache process")
while True: while True:
background_cache() background_cache()
time.sleep(10*60) time.sleep(10 * 60)