fix: harden events log — non-dict ring entries, off-loop journal reads, no default-config singleton

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 15:51:34 -04:00
co-authored by Claude Fable 5
parent 00fdbcaa5b
commit 92982c0ca7
4 changed files with 24 additions and 6 deletions
+8 -4
View File
@@ -389,10 +389,14 @@ async def start(
ej = journal_mod.get_events_journal(config)
if ej.enabled and ej.journal_path.is_file():
events, more = journal_mod.read_events(
ej.journal_dir, ej.journal_file,
limit=limit, before=before, host=host_f, level=level_f, q=q_f,
predicate=visible,
# File scan can be large; keep it off the loop that services UDP/WS
events, more = await asyncio.get_running_loop().run_in_executor(
None,
lambda: journal_mod.read_events(
ej.journal_dir, ej.journal_file,
limit=limit, before=before, host=host_f, level=level_f, q=q_f,
predicate=visible,
),
)
else:
# Journal disabled or not yet written: serve the in-memory ring