diff --git a/.efrocachemap b/.efrocachemap
index 6d5774c5..be722566 100644
--- a/.efrocachemap
+++ b/.efrocachemap
@@ -4076,18 +4076,18 @@
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "c14f956a37c6c4b854528431f69d97a3",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "fd57912de1a8c12d23b9f19729b963d8",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "3e21f3f57cd594dcd4e4b4ed14546cd8",
- "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "09907e81afe7c3a148f21cef2c73e87a",
+ "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "f44a6df016cf67d1f7fdae8650570a72",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "f3d980a36605c34dca3b12184326163a",
- "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "fe9a05767cd07e3bc1c4e09698650b0e",
+ "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "122f5d19c0e81c2c0c576ed8892d0881",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "badf5f08cbcb64742114ca048c6b7727",
- "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "57d637ebae10327b6f49966ec46c616b",
+ "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "b5a74c9738f32e610e7cdd8b8aca4923",
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "8977914f6658821d8f2e4bd5ddd01072",
- "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "ed6837468430103572b1d6bcb4373d10",
+ "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "f06395b77b3c87eaec5220f93058787d",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "f8b4ac0346f70ff11ede342cc411f488",
- "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "7477de94db17daf9562b8a70eca80e3e",
- "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "31b07c33ea5f7341b4839e0254ab4063",
- "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "7136c72bf182ad936289c52100b0b3a1",
- "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "a3ea5777d3faee912a6cfa4309aaa504",
+ "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "81aa7050bfb228415f51d07973cbc87d",
+ "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "dad71348c8a208eeb80c50665948be21",
+ "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "59b453c1ec53850614c42fe1af0e2391",
+ "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "b68624860ce07ee498a0aed7219767a7",
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "85ba4e81a1f7ae2cff4b1355eb49904f",
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "498921f7eb2afd327d4b900cb70e31f9",
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "85ba4e81a1f7ae2cff4b1355eb49904f",
@@ -4104,14 +4104,14 @@
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "0ab638b6602610bdaf432e3cc2464080",
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "92394eb19387c363471ce134ac9e6a1b",
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "0ab638b6602610bdaf432e3cc2464080",
- "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "fe2e8a79ff07c4c34504328910053b53",
- "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "34924c80882be7ef762e714704834d5f",
- "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "dd6aa0c821b7fab6a688e334a9ae9404",
- "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "f6963241a3d2cf613fdb1fc9ac0340a8",
- "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "fdb89547f0df660bd62c64d23d9c918f",
- "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "9171cff8b56a35d2735d5ea93798b2bd",
- "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "edc75ad6d89e1b9c347e322581a9c261",
- "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "2cc2646a2efc0bdee3797ba4d3c26507",
+ "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "b01cd06392836b75861f4f3084f21ec6",
+ "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "f149c54efbbd6de771a2510f2b25ee44",
+ "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "cfa4157b6d72a7fb5314d7c104e6853a",
+ "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "501d09fc6804d9f522aaea8ee157e02b",
+ "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "f5738a8c8614dd6bb97a8b914d618106",
+ "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "0a083f99daf7fd66f6f4b59974995e48",
+ "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "8b886b0a02f36ad819a06519511fd25f",
+ "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "bb7e520fe61626b264b4fd7cff27bcbf",
"src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c",
"src/assets/ba_data/python/babase/_mgen/enums.py": "f8cd3af311ac63147882590123b78318",
"src/ballistica/base/mgen/pyembed/binding_base.inc": "eeddad968b176000e31c65be6206a2bc",
diff --git a/.idea/dictionaries/ericf.xml b/.idea/dictionaries/ericf.xml
index ea9782d1..e7e921f3 100644
--- a/.idea/dictionaries/ericf.xml
+++ b/.idea/dictionaries/ericf.xml
@@ -276,6 +276,7 @@
basnmessagesender
basntoclient
bastd
+ batchserver
batemplatefs
batemplatefsmeta
batocloud
diff --git a/ballisticakit-cmake/.idea/dictionaries/ericf.xml b/ballisticakit-cmake/.idea/dictionaries/ericf.xml
index b983b1cb..6815396d 100644
--- a/ballisticakit-cmake/.idea/dictionaries/ericf.xml
+++ b/ballisticakit-cmake/.idea/dictionaries/ericf.xml
@@ -172,6 +172,7 @@
basnmessagesender
basntoclient
bastd
+ batchserver
batemplatefs
batemplatefsmeta
batocloud
diff --git a/src/tools/pcommandbatch/pcommandbatch.c b/src/tools/pcommandbatch/pcommandbatch.c
index a8a12dc3..e66f511d 100644
--- a/src/tools/pcommandbatch/pcommandbatch.c
+++ b/src/tools/pcommandbatch/pcommandbatch.c
@@ -237,11 +237,11 @@ int establish_connection_(const struct Context_* ctx) {
}
char buf[512];
snprintf(buf, sizeof(buf),
- "%s run_pcommandbatch_server --timeout %d --project-dir %s"
- " --state-dir %s --instance %s_%d %s",
+ "%s batchserver --timeout %d --project-dir %s"
+ " --instance %s_%d %s",
ctx->pcommandpath, ctx->server_idle_seconds,
- ctx->project_dir_path, ctx->state_dir_path, ctx->instance_prefix,
- ctx->instance_num, endbuf);
+ ctx->project_dir_path, ctx->instance_prefix, ctx->instance_num,
+ endbuf);
system(buf);
// Spin and wait up to a few seconds for the file to appear.
diff --git a/tools/efrotools/pcommandbatch.py b/tools/efrotools/pcommandbatch.py
index f703ac46..d045f20e 100644
--- a/tools/efrotools/pcommandbatch.py
+++ b/tools/efrotools/pcommandbatch.py
@@ -126,8 +126,8 @@ def build_pcommandbatch(inpaths: list[str], outpath: str) -> None:
)
-def run_pcommandbatch_server(
- idle_timeout_secs: int, project_dir: str, state_dir: str, instance: str
+def batchserver(
+ idle_timeout_secs: int, project_dir: str, instance: str
) -> None:
"""Run a server for handling batches of pcommands.
@@ -146,7 +146,6 @@ def run_pcommandbatch_server(
server = Server(
idle_timeout_secs=idle_timeout_secs,
project_dir=project_dir,
- state_dir=state_dir,
instance=instance,
daemon=use_daemon,
)
@@ -171,15 +170,16 @@ class Server:
self,
idle_timeout_secs: int,
project_dir: str,
- state_dir: str,
instance: str,
daemon: bool,
) -> None:
self._daemon = daemon
self._project_dir = project_dir
- self._state_dir = state_dir
+ self._state_dir = f'{project_dir}/.cache/pcommandbatch'
self._idle_timeout_secs = idle_timeout_secs
- self._worker_state_file_path = f'{state_dir}/worker_state_{instance}'
+ self._worker_state_file_path = (
+ f'{self._state_dir}/worker_state_{instance}'
+ )
self._worker_log_file_path = f'{self._state_dir}/worker_log_{instance}'
self._client_count_since_last_check = 0
self._running_client_count = 0
diff --git a/tools/efrotools/pcommands2.py b/tools/efrotools/pcommands2.py
index 486e9a62..5216560e 100644
--- a/tools/efrotools/pcommands2.py
+++ b/tools/efrotools/pcommands2.py
@@ -118,7 +118,7 @@ def build_pcommandbatch() -> None:
pcb.build_pcommandbatch(inpaths, outpath)
-def run_pcommandbatch_server() -> None:
+def batchserver() -> None:
"""Run a server for handling pcommands."""
from efro.error import CleanError
@@ -131,16 +131,14 @@ def run_pcommandbatch_server() -> None:
idle_timeout_secs = int(extract_arg(args, '--timeout', required=True))
project_dir = extract_arg(args, '--project-dir', required=True)
- state_dir = extract_arg(args, '--state-dir', required=True)
instance = extract_arg(args, '--instance', required=True)
if args:
raise CleanError(f'Unexpected args: {args}.')
- pcb.run_pcommandbatch_server(
+ pcb.batchserver(
idle_timeout_secs=idle_timeout_secs,
project_dir=project_dir,
- state_dir=state_dir,
instance=instance,
)
diff --git a/tools/pcommand b/tools/pcommand
index f5b19bfe..fb5b2e4c 100755
--- a/tools/pcommand
+++ b/tools/pcommand
@@ -63,7 +63,7 @@ from efrotools.pcommands2 import (
openal_gather,
pyright,
build_pcommandbatch,
- run_pcommandbatch_server,
+ batchserver,
pcommandbatch_speed_test,
null,
)