Skip to content

Commit 99fc5ba

Browse files
vdberghppigazzini
authored andcommitted
Raise WorkerException when fastchess crashes.
Should fix official-stockfish#2412. Raise worker version to 304 (also server side)
1 parent 2c40b5c commit 99fc5ba

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

server/fishtest/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
according to the route/URL mapping defined in `__init__.py`.
3737
"""
3838

39-
WORKER_VERSION = 303
39+
WORKER_VERSION = 304
4040

4141

4242
@exception_view_config(HTTPException)

worker/games.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,13 @@ def shorten_hash(match):
10891089
try:
10901090
line = q.get_nowait().strip()
10911091
except Empty:
1092-
if p.poll() is not None:
1092+
returncode = p.poll()
1093+
if returncode is not None:
1094+
if returncode != 0:
1095+
raise WorkerException(
1096+
"Fastchess failed with error code "
1097+
f"{format_returncode(returncode)}"
1098+
)
10931099
break
10941100
time.sleep(0.1)
10951101
continue

worker/sri.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"__version": 303, "updater.py": "eDDBPKA/vrTCadgtEJFdL06vSoiysF0JhiHKdEnjQv3zS4kfdOAqnco/DJpDWbvh", "worker.py": "f8YZy2eGjfNUU4WOnpiP92BqwkniTrsiENSaa6YPUsPYcLv14PjfxDnEVJTNytzA", "games.py": "xb1DODe7mtxfJ2kqCTuh4TODbUYtB//6d/Q23axr/2+oMwbLbMIkGCgtFj3nj2Ur"}
1+
{"__version": 304, "updater.py": "eDDBPKA/vrTCadgtEJFdL06vSoiysF0JhiHKdEnjQv3zS4kfdOAqnco/DJpDWbvh", "worker.py": "L/noj+51EmTKTzGL5vTKl9rki7nn+TOowWvM6sGEUZFSis4QJkIKdLH6qpjEyvnk", "games.py": "KDn7eZC50NL6oraC27K59dfg0pKTUeDwvIucw6xTC8L7vm0nsMW3npm+qeTiEoST"}

worker/worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474

7575
FASTCHESS_SHA = "e892ad92a74c8a4fd7184b9e4867b97ae8952685"
7676

77-
WORKER_VERSION = 303
77+
WORKER_VERSION = 304
7878
FILE_LIST = ["updater.py", "worker.py", "games.py"]
7979
HTTP_TIMEOUT = 30.0
8080
INITIAL_RETRY_TIME = 15.0

0 commit comments

Comments
 (0)