mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
config.yml is re-read on every request, so streaming can be turned on without a restart, and exit save pulls queued before it was turned off still need a worker. With streaming off at boot, the general RQ worker now listens on the streaming queue too instead of leaving it without a consumer; the dedicated streaming worker still starts only when streaming is on. The check reads the exit status inline rather than through a function in an `if !`, which shellcheck flags (SC2310) since it disables errexit. Adds a fresh-interpreter test that init_sentry() never imports the SDK without a DSN, and drops a comment that restated the PR's rationale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gh1SRMfuK7BZmf6YxMqSyT
14 lines
353 B
Python
14 lines
353 B
Python
from config import SENTRY_DSN
|
|
from utils import get_version
|
|
|
|
|
|
def init_sentry() -> None:
|
|
"""Start Sentry error reporting when a DSN is configured."""
|
|
if not SENTRY_DSN:
|
|
return
|
|
|
|
# Imported here so a process without a DSN never loads the SDK.
|
|
import sentry_sdk
|
|
|
|
sentry_sdk.init(dsn=SENTRY_DSN, release=f"romm@{get_version()}")
|