feat: stabilize multi-region runtime sync and worker orchestration
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user