feat: Add more descriptive cache error message
All checks were successful
Build Docker / BuildImage (push) Successful in 35s

This commit is contained in:
Nathan Woodburn 2024-12-12 13:49:20 +11:00
parent 10d2cfcca8
commit 721025b10c
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -33,7 +33,7 @@ def file_cache(ttl=3600):
with open(cache_file, "w") as f:
json.dump({"timestamp": time(), "result": result}, f)
except Exception as e:
print(f"Error during cache refresh: {e}",flush=True)
print(f"Error during cache refresh of {cache_file} (Name: {func.__name__}): {e}")
threading.Thread(target=refresh_loop).start()