sync: add cross-subsystem event bus for config consistency
Add EventBus with loop guards to keep firewall, dnsmasq, wireguard, and network configs consistent. Handlers emit SyncEvent after mutations; subscribers compute diffs and write JSON without manual cascade loops.
This commit is contained in:
@@ -457,7 +457,12 @@ def update_domain(_request: Any, body: dict[str, Any] | None) -> dict[str, Any]:
|
||||
|
||||
# Path removal: if body has `path` key (string) but no `paths`/`backend`/`headers`
|
||||
path_to_remove = body.get("path")
|
||||
if path_to_remove is not None and "paths" not in body and "backend" not in body and "headers" not in body:
|
||||
if (
|
||||
path_to_remove is not None
|
||||
and "paths" not in body
|
||||
and "backend" not in body
|
||||
and "headers" not in body
|
||||
):
|
||||
paths = entry.get("paths", {})
|
||||
if path_to_remove in paths:
|
||||
del paths[path_to_remove]
|
||||
|
||||
Reference in New Issue
Block a user