mirror of
https://github.com/smittix/intercept.git
synced 2026-07-12 11:38:12 -07:00
v2.26.0: fix SSE fanout crash and branded logo FOUC
- Fix SSE fanout thread AttributeError when source queue is None during interpreter shutdown by snapshotting to local variable with null guard - Fix branded "i" logo rendering oversized on first page load (FOUC) by adding inline width/height to SVG elements across 10 templates - Bump version to 2.26.0 in config.py, pyproject.toml, and CHANGELOG.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,13 +6,13 @@ import logging
|
||||
import queue
|
||||
import threading
|
||||
import time
|
||||
from collections.abc import Iterable
|
||||
from datetime import datetime, timezone
|
||||
from typing import Iterable
|
||||
|
||||
# psycopg2 is optional - only needed for PostgreSQL history persistence
|
||||
try:
|
||||
import psycopg2
|
||||
from psycopg2.extras import execute_values, Json
|
||||
from psycopg2.extras import Json, execute_values
|
||||
PSYCOPG2_AVAILABLE = True
|
||||
except ImportError:
|
||||
psycopg2 = None # type: ignore
|
||||
@@ -20,6 +20,8 @@ except ImportError:
|
||||
Json = None # type: ignore
|
||||
PSYCOPG2_AVAILABLE = False
|
||||
|
||||
import contextlib
|
||||
|
||||
from config import (
|
||||
ADSB_DB_HOST,
|
||||
ADSB_DB_NAME,
|
||||
@@ -289,10 +291,8 @@ class AdsbHistoryWriter:
|
||||
return True
|
||||
except Exception as exc:
|
||||
logger.warning("ADS-B history insert failed: %s", exc)
|
||||
try:
|
||||
with contextlib.suppress(Exception):
|
||||
conn.rollback()
|
||||
except Exception:
|
||||
pass
|
||||
self._conn = None
|
||||
time.sleep(2.0)
|
||||
return False
|
||||
@@ -393,10 +393,8 @@ class AdsbSnapshotWriter:
|
||||
return True
|
||||
except Exception as exc:
|
||||
logger.warning("ADS-B snapshot insert failed: %s", exc)
|
||||
try:
|
||||
with contextlib.suppress(Exception):
|
||||
conn.rollback()
|
||||
except Exception:
|
||||
pass
|
||||
self._conn = None
|
||||
time.sleep(2.0)
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user