feat: enhance service discovery and proxy management
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from repositories.proxy import list_proxies, update_proxy_runtime
|
||||
from services.mitmproxy.manager import manager
|
||||
|
||||
|
||||
async def reconcile_runtime() -> list[tuple[int, dict[str, object]]]:
|
||||
changes: list[tuple[int, dict[str, object]]] = []
|
||||
|
||||
for proxy in await list_proxies():
|
||||
updates = await manager.reconcile(proxy)
|
||||
if updates is None:
|
||||
continue
|
||||
|
||||
await update_proxy_runtime(proxy.proxy_port, updates)
|
||||
changes.append((proxy.proxy_port, updates))
|
||||
|
||||
return changes
|
||||
Reference in New Issue
Block a user