← Main Menu All manuals Operator Guide for this screen IM2

Poll Log — technical

Poll Log
Technical Spec Ver 1 Updated 2026-09-17 Matches the live screen

Poll Log — technical

Route GET /ro/poll-log in app/ro.py (poll_log_screen), template templates/ro_poll_log.html, jump-bar entry in base.html (ro_nav_screens includes ro_poll_log). Requires the ro_view action like every RO screen.

Table (RO database)

`` ro_poll_log (poll_id bigserial pk, started_at timestamptz, finished_at timestamptz, source_system text FP|BT, trigger text cron|manual, outcome text ok|error|skipped, scanned int, staged int, skipped int, detail text) index ro_poll_log_started_idx (started_at desc) ``

Writer

skills/requirements_orders/scripts/ro_poll_runner.py (Viktor cron /logistics/ro-intake-poll, hourly :07) — log_poll() writes one row per source per tick:

Failures are never allowed to break the sweep (log_poll swallows its own exceptions).

Alerting (two independent paths)

  1. Runner: alert() DMs Dave (U9RTEG3A6), throttled by ro_poll_last_alert_at (6h). Since 2026-09-17 the runner re-execs under uv run --with psycopg2-binary … when the driver is missing, and crash_alert() catches anything escaping main().
  2. skills/im2_app/scripts/check_auto_po.py (cron /logistics/auto-po-watchdog, every 15 min) prints POLL_FP=OK|STALE|OFF / POLL_BT=…: STALE when *_poll_hours > 0 and the last clean stamp is older than 2 × interval + 1h (or missing). The cron DMs Dave once per episode.

History

2026-09-11 03:10 → 2026-09-17 23:10 UTC: 164 consecutive ticks failed on ModuleNotFoundError: psycopg2 at import, before the alert code — no DM, nothing staged. Backfilled as a single summary error row (poll_id 3). Catch-up manual sweeps logged as rows 4-5.