From 3b653f7bdc90acbee574bce4391291b7aca0023f Mon Sep 17 00:00:00 2001 From: Jules Dejaeghere Date: Fri, 30 Oct 2020 13:18:10 +0100 Subject: [PATCH] Improve caching system --- app/tools/caching.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/tools/caching.py b/app/tools/caching.py index 8a12948..02cca63 100644 --- a/app/tools/caching.py +++ b/app/tools/caching.py @@ -76,7 +76,10 @@ def background_cache() -> None: for entry in config: 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")) @@ -88,4 +91,4 @@ class CacheThread(threading.Thread): print("Starting cache process") while True: background_cache() - time.sleep(10*60) + time.sleep(10 * 60)