Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

Commit

Permalink
Suppress flask logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-Toosi committed Jun 17, 2023
1 parent c53fe72 commit 25fdd6b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/web_server/flask_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os.path
import logging
import os
import time
from threading import Thread

Expand All @@ -16,7 +17,6 @@

def get_full_path_or_404(file_name):
full_file_path = os.path.join(ROOT_DIRECTORY, file_name)
print(full_file_path)
if not os.path.exists(full_file_path):
return False, (jsonify({"message": "Replay file not found."}), 404)

Expand Down Expand Up @@ -100,6 +100,9 @@ def get_file_contents():


def start(replay_files_directory, port=2023, debug=False):
if not debug:
logging.getLogger("werkzeug").setLevel(logging.ERROR)

# This wait time here is implemented for the game server to have enough time to write a couple of the replay files
time.sleep(7)

Expand Down

0 comments on commit 25fdd6b

Please sign in to comment.