feat: stabilize multi-region runtime sync and worker orchestration

This commit is contained in:
root
2026-04-27 15:48:12 +08:00
parent 7cbde2aa78
commit 215a364891
137 changed files with 31931 additions and 1943 deletions

View File

@@ -211,14 +211,21 @@ def runtime_action(action: str, payload: dict | None = None) -> tuple[bool, str,
_emit_runtime_action_event(normalized_action, stage="finished", ok=command_ok, message=command_message, data=result)
return command_ok, command_message, result
if normalized_action == "stop_detection":
command_ok, command_message = send_worker_command("stop_detection")
command_ok, command_message = send_worker_command(
"stop_detection",
payload={
key: value
for key, value in normalized_payload.items()
if value not in (None, "")
},
)
result = _build_runtime_action_result(
action=normalized_action,
poll_after_seconds=2,
refresh_runtime=True,
ok=command_ok,
message=command_message,
data={},
data={"payload": normalized_payload},
)
_emit_runtime_action_event(normalized_action, stage="finished", ok=command_ok, message=command_message, data=result)
return command_ok, command_message, result