chore: remove unused masscan scanner
Active discovery never produced cameras rows. Drop the scanner, systemd unit, ingest trigger, and docs/env knobs. Keep RTSP preview via ffmpeg.
This commit is contained in:
parent
ef27e13e50
commit
158ecc6235
13 changed files with 28 additions and 689 deletions
21
app/main.py
21
app/main.py
|
|
@ -25,7 +25,7 @@ from uuid import UUID
|
|||
|
||||
import httpx
|
||||
import structlog
|
||||
from fastapi import BackgroundTasks, FastAPI, HTTPException, Query, WebSocket, WebSocketDisconnect
|
||||
from fastapi import FastAPI, HTTPException, Query, WebSocket, WebSocketDisconnect
|
||||
from fastapi.middleware.gzip import GZipMiddleware
|
||||
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
|
|
@ -857,21 +857,6 @@ async def trigger_social_ingest(query: str = "", max_items: int = 50):
|
|||
return {"status": "ok", "signals_ingested": count}
|
||||
|
||||
|
||||
@app.post("/api/ingest/masscan")
|
||||
async def trigger_masscan(background_tasks: BackgroundTasks):
|
||||
"""Queue one masscan pass at ≤200 pps. Does not block the request on the scan."""
|
||||
from bg_jobs import MASSCAN_PPS_CAP, schedule_masscan_pass
|
||||
|
||||
async def _kick() -> None:
|
||||
schedule_masscan_pass()
|
||||
|
||||
background_tasks.add_task(_kick)
|
||||
return JSONResponse(
|
||||
{"status": "accepted", "rate_pps": MASSCAN_PPS_CAP},
|
||||
status_code=202,
|
||||
)
|
||||
|
||||
|
||||
@app.websocket("/ws/live")
|
||||
async def live_ws(ws: WebSocket):
|
||||
"""Viewport-filtered AIS/ADS-B fan-out. Client sends {type:viewport,bbox}."""
|
||||
|
|
@ -1051,7 +1036,7 @@ async def list_cameras(
|
|||
True,
|
||||
description="Only cameras with a verified HTTP/MJPEG snapshot_url "
|
||||
"(the ones that actually preview). Set false to include "
|
||||
"unverified masscan port-554 hits.",
|
||||
"rows without a snapshot_url.",
|
||||
),
|
||||
limit: int = Query(500, ge=1, le=5000),
|
||||
):
|
||||
|
|
@ -1128,7 +1113,7 @@ async def get_camera(camera_id: UUID):
|
|||
async def camera_snapshot(camera_id: UUID):
|
||||
"""Still image for one camera.
|
||||
|
||||
HTTP cameras go through the TTL cache. masscan/RTSP finds have no HTTP
|
||||
HTTP cameras go through the TTL cache. RTSP finds have no HTTP
|
||||
snapshot_url — we probe common still-image paths and, failing that, grab
|
||||
one JPEG frame from RTSP via ffmpeg. No credentials are tried.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue