Logbook auto: run the stats rebuild in its own data dir so agents' compiles can't lock it
This commit is contained in:
1 parent
580fcfacb4
commit
774b0ae25a
1 file changed
+4
-1
@@ -13,6 +13,7 @@ Milestones and narrative entries stay with people: they need judgement.
|
||||
|
||||
State (the last commit seen) is kept in the logbook folder as auto.json."""
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -81,7 +82,9 @@ def log_commits(project, repo, since, head):
|
||||
def rebuild_stats(project, repo, stats_repo, head):
|
||||
"""Run the open-seas progress tools on the scratch copy and store their statistics and chart."""
|
||||
tools = Path(stats_repo) / "tools" / "progress"
|
||||
run = lambda *argv: subprocess.run([sys.executable, "-B", *map(str, argv)], cwd=str(stats_repo),
|
||||
# its own data dir: the agents' compiles hold the shared decomp-build\pirates.h open
|
||||
env = dict(os.environ, OPENSEAS_DATA=os.environ.get("HARBOR_LOGBOOK_DATA", r"R:\Workspace\Data\openseas-logbook"))
|
||||
run = lambda *argv: subprocess.run([sys.executable, "-B", *map(str, argv)], cwd=str(stats_repo), env=env,
|
||||
capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=900)
|
||||
sync = run(tools / "sync_decomp.py", "--decomp", repo)
|
||||
if sync.returncode != 0:
|
||||
|
||||
Reference in new issue
Block a user