mirror of
https://github.com/simon987/od-database.git
synced 2025-12-13 14:59:02 +00:00
Stats are generated in background and stored to file instead of on-demand
This commit is contained in:
6
app.py
6
app.py
@@ -68,8 +68,10 @@ def stats_page():
|
||||
@cache.cached(240)
|
||||
def stats_json():
|
||||
stats = searchEngine.get_global_stats()
|
||||
db.join_website_on_stats(stats)
|
||||
return Response(json.dumps(stats), mimetype="application/json")
|
||||
if stats:
|
||||
db.join_website_on_stats(stats)
|
||||
return Response(json.dumps(stats), mimetype="application/json")
|
||||
return abort(500)
|
||||
|
||||
|
||||
@app.route("/get_export")
|
||||
|
||||
Reference in New Issue
Block a user