Skip to content

Commit

Permalink
Salvage fastchess binary after worker update.
Browse files Browse the repository at this point in the history
  • Loading branch information
vdbergh committed Jan 21, 2025
1 parent 6d6dde3 commit 9440ecb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion worker/sri.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"__version": 252, "updater.py": "Mg+pWOgGA0gSo2TuXuuLCWLzwGwH91rsW1W3ixg3jYauHQpRMtNdGnCfuD1GqOhV", "worker.py": "JHO7pc2YF9noh8wsc1Pxmtd9x9zG8Hr+0haT7HEAvsCR1wYzUAYCUk7bWT/BJqOX", "games.py": "IZmJeczQV7IDMOvWS1NqR/tPe+Zg3rI8D1QDYIz/dvRE8auUU66PEjyfhWf9nbNe"}
{"__version": 252, "updater.py": "5DgMNNTa2QW/FuKPIjxkeb6g2tcOk5sQnsJyldGBBCRqsEp0NW3bu1jGJsSo0TH8", "worker.py": "JHO7pc2YF9noh8wsc1Pxmtd9x9zG8Hr+0haT7HEAvsCR1wYzUAYCUk7bWT/BJqOX", "games.py": "IZmJeczQV7IDMOvWS1NqR/tPe+Zg3rI8D1QDYIz/dvRE8auUU66PEjyfhWf9nbNe"}
14 changes: 14 additions & 0 deletions worker/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@ def update(restart=True, test=False):
sep="",
file=sys.stderr,
)
# Salvage fastchess binary
old_fast_chess = bkp_testing_dir / "fastchess"
if old_fast_chess.exists():
new_fast_chess = testing_dir / "fastchess"
try:
old_fast_chess.replace(new_fast_chess)
except Exception as e:
print(
"Failed to preserve fastchess binary:\n",
e,
sep="",
file=sys.stderr,
)

# Clean up old folder backups (keeping the num_bkps most recent).
num_bkps = 3
for old_bkp_dir in sorted(
Expand Down

0 comments on commit 9440ecb

Please sign in to comment.