Self-hosted homelab infrastructure visualizer — interactive network diagram with live status monitoring
TypeScript diagramhomelabhomelab-infrastructure-observabilitynetworkproxmox-veself-hostedzigbeezwavezwave-js
fix: remove stale reschedule call from scan config after settings endpoint split
Pouzore9152df17a83
diff --git a/backend/app/api/routes/scan.py b/backend/app/api/routes/scan.pyindex ea19242..7d9a535 100644--- a/backend/app/api/routes/scan.py+++ b/backend/app/api/routes/scan.py@@ -8,7 +8,6 @@ from sqlalchemy.ext.asyncio import AsyncSessionfrom app.api.deps import get_current_userfrom app.core.config import settings-from app.core.scheduler import reschedule_status_checksfrom app.db.database import AsyncSessionLocal, get_dbfrom app.db.models import Node, PendingDevice, ScanRunfrom app.schemas.nodes import NodeCreate@@ -111,7 +110,6 @@ async def update_scan_config(payload: ScanConfig, _: str = Depends(get_current_utry:settings.scanner_ranges = payload.rangessettings.save_overrides()- reschedule_status_checks(payload.interval_seconds)return payloadexcept Exception as exc:raise HTTPException(status_code=500, detail=str(exc)) from excdiff --git a/backend/tests/test_scan.py b/backend/tests/test_scan.pyindex c34b44d..c03b8b4 100644--- a/backend/tests/test_scan.py+++ b/backend/tests/test_scan.py@@ -156,26 +156,6 @@ async def test_ignore_device(client: AsyncClient, headers, pending_device):assert hidden_res.json() == []-# --- Scan config -----async def test_update_scan_config_reschedules_interval(client: AsyncClient, headers):- """Saving a new interval must reschedule the running APScheduler job immediately."""- with (- patch("app.api.routes.scan.settings") as mock_settings,- patch("app.api.routes.scan.reschedule_status_checks") as mock_reschedule,- ):- mock_settings.scanner_ranges = []- mock_settings.save_overrides = lambda: None- res = await client.post(- "/api/v1/scan/config",- json={"ranges": ["192.168.1.0/24"], "interval_seconds": 30},- headers=headers,- )- assert res.status_code == 200- mock_reschedule.assert_called_once_with(30)--# --- Scan runs ---@pytest.mark.asyncio