fix /stats

master
Aevann1 2022-12-21 01:44:53 +02:00
parent 11ed781b7a
commit 9b7c0a674b
2 changed files with 2 additions and 2 deletions

View File

@ -51,6 +51,7 @@ app.config['SQLALCHEMY_DATABASE_URL'] = environ.get("DATABASE_URL").strip()
app.config["CACHE_TYPE"] = "RedisCache"
app.config["CACHE_REDIS_URL"] = environ.get("REDIS_URL").strip()
app.config["CACHE_DEFAULT_TIMEOUT"] = 604800
app.config['SERVICE'] = Service.RDRAMA
if "load_chat" in argv:

View File

@ -43,8 +43,7 @@ def cron(every_5m, every_1h, every_1d, every_1mo):
stats.generate_charts_task(SITE)
_sub_inactive_purge_task()
site_stats = stats.stats(SITE_NAME)
if site_stats:
cache.set(f'{SITE}_stats', site_stats)
cache.set(f'{SITE}_stats', site_stats)
if every_1mo:
if KOFI_LINK: _give_monthly_marseybux_task_kofi()