feat: add automatic cluster sync and IPAM discovery with configurable intervals, firewall log file parsing, and enhanced flow prioritization

Add RuntimeSettingsRead/RuntimeSettingsUpdate schemas with auto_node_sync_enabled/auto_node_sync_interval_minutes/auto_ipam_sync_enabled/auto_ipam_sync_interval_minutes/last_node_auto_sync_at/last_ipam_auto_sync_at fields, implement firewall_log_lines_from_files to parse /var/log/pve-firewall.log with max_lines limit and error collection, extend collect_firewall_log
This commit is contained in:
2026-07-10 08:13:40 +02:00
parent 1531b7ea47
commit 67eee0662a
10 changed files with 493 additions and 65 deletions
+18 -5
View File
@@ -1,12 +1,25 @@
import time
import asyncio
from app.db.session import SessionLocal
from app.services.auto_sync import run_due_jobs
async def loop() -> None:
print("NexaFabric worker started. Auto-sync scheduler is active.", flush=True)
while True:
try:
with SessionLocal() as db:
results = await run_due_jobs(db)
for result in results:
print(f"auto-sync: {result}", flush=True)
except Exception as exc:
print(f"auto-sync failed: {exc}", flush=True)
await asyncio.sleep(30)
def main() -> None:
print("NexaFabric worker started. Configure Celery queues for production job execution.", flush=True)
while True:
time.sleep(30)
asyncio.run(loop())
if __name__ == "__main__":
main()