This commit is contained in:
Aevann1 2022-01-22 22:03:46 +02:00
parent f59d4e6f11
commit bdc1745e37
3 changed files with 11 additions and 11 deletions

View file

@ -116,12 +116,11 @@ def after_request(response):
response.headers.add("X-Frame-Options", "deny")
return response
if not cache.get("marseys"):
with open("marseys.json", 'r') as f: cache.set("marseys", loads(f.read()))
with open("marseys.json", 'r') as f: cache.set("marseys", loads(f.read()))
from files.routes import *
def close_running_threads():
with open('marsey_count.json', 'w') as f: dump(cache.get("marseys"), f)
with open('marseys.json', 'w') as f: dump(cache.get("marseys"), f)
stdout.flush()
atexit.register(close_running_threads)