forked from MarseyWorld/MarseyWorld
add print statements for debugging /stats
parent
7fabf323f8
commit
a7ec033698
|
@ -43,7 +43,10 @@ def cron(every_5m, every_1h, every_1d, every_1mo):
|
||||||
stats.generate_charts_task(SITE)
|
stats.generate_charts_task(SITE)
|
||||||
_sub_inactive_purge_task()
|
_sub_inactive_purge_task()
|
||||||
site_stats = stats.stats(SITE_NAME)
|
site_stats = stats.stats(SITE_NAME)
|
||||||
|
print(site_stats, flush=True)
|
||||||
cache.set(f'{SITE}_stats', site_stats)
|
cache.set(f'{SITE}_stats', site_stats)
|
||||||
|
print('redised', flush=True)
|
||||||
|
print(cache.get(f'{SITE}_stats'), flush=True)
|
||||||
|
|
||||||
if every_1mo:
|
if every_1mo:
|
||||||
if KOFI_LINK: _give_monthly_marseybux_task_kofi()
|
if KOFI_LINK: _give_monthly_marseybux_task_kofi()
|
||||||
|
|
|
@ -84,7 +84,9 @@ def sidebar(v:Optional[User]):
|
||||||
@app.get("/stats")
|
@app.get("/stats")
|
||||||
@auth_required
|
@auth_required
|
||||||
def participation_stats(v:User):
|
def participation_stats(v:User):
|
||||||
|
print(cache.get(f'{SITE}_stats'), flush=True)
|
||||||
stats = cache.get(f'{SITE}_stats') or {}
|
stats = cache.get(f'{SITE}_stats') or {}
|
||||||
|
print(stats, flush=True)
|
||||||
if v.client: return stats
|
if v.client: return stats
|
||||||
return render_template("stats.html", v=v, title="Content Statistics", data=stats)
|
return render_template("stats.html", v=v, title="Content Statistics", data=stats)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue