Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes#355: [Pdr acc] CORS, Debug Mode, the first day issue on the calculation #358

Merged
merged 24 commits into from
Nov 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Black and pylint issue
  • Loading branch information
kdetry committed Oct 31, 2023
commit 270a549a0e1aa0e9d0f0c0094f882d0395891b38
5 changes: 3 additions & 2 deletions pdr_backend/accuracy/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import threading
import json
from flask import Flask, jsonify, abort
from flask import Flask, jsonify

from pdr_backend.util.predictoor_stats import get_endpoint_statistics
from pdr_backend.util.subgraph_predictions import (
Expand Down Expand Up @@ -50,9 +50,10 @@ def serve_predictions_from_file():
data = json.load(f)
return jsonify(data)
except Exception as e:
#abort(500, description=str(e))
# abort(500, description=str(e))
return jsonify({"error": "Internal Server Error", "message": str(e)}), 500


if __name__ == "__main__":
# Start the thread to save predictions data to a file every 5 minutes
thread = threading.Thread(target=save_predictions_to_file)
Expand Down
Loading