Harden Local Agent singleton supervisor and worker lifecycle

This commit is contained in:
A R R R Associates
2026-09-04 09:39:07 +05:30
parent 5d13373e36
commit 4deef57364
5 changed files with 103 additions and 14 deletions
@@ -1,2 +1,2 @@
__version__ = "1.22.10"
__version__ = "1.22.11"
AGENT_NAME = "ERP Local Agent"
@@ -14,7 +14,7 @@ ERROR_ALREADY_EXISTS = 183
def _mutex_name(scope: str, root: Path) -> str:
normalized = str(root.resolve()).casefold().encode("utf-8", errors="ignore")
suffix = hashlib.sha256(normalized).hexdigest()[:20]
return f"Local\\ARRR_ERP_Local_Agent_{scope}_{suffix}"
return f"Global\\ARRR_ERP_Local_Agent_{scope}_{suffix}"
def acquire_named_mutex(scope: str, root: Path):