Fix clock, I guess ?

This commit is contained in:
2025-12-31 17:11:43 +01:00
parent f079ba49e9
commit 9416f2bd84
3 changed files with 8 additions and 9 deletions

View File

@@ -48,11 +48,8 @@ class GameController:
if auth_token != "Bearer " + self._auth_token:
return jsonify({"status": "error", "message": "Invalid authorization token"}), 401
img, fen = self._game_service.make_move()
threading.Thread(
target=self.__send_detection_result,
args=("https://192.168.15.125:1880/party/image", img, fen),
target=self._analyze_move(),
daemon=True
).start()
@@ -61,7 +58,11 @@ class GameController:
print(ex)
return jsonify({"status": "error", "message": f"An error occurred : {ex}"}), 500
def __send_detection_result(self, url, img, fen):
def _analyze_move(self):
img, fen = self._game_service.make_move()
self._send_detection_result("https://192.168.15.125:1880/party/image", img, fen)
def _send_detection_result(self, url, img, fen):
try:
headers = {'Content-Type': 'image/jpeg'}
body = {'frame': img, 'fen': fen}