fix: skip journal scheduling when the event loop is not running
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -139,7 +139,7 @@ def eventlog(host, lvl, m, service=None):
|
|||||||
|
|
||||||
def _journal_event(msg: dict):
|
def _journal_event(msg: dict):
|
||||||
"""Schedule an async write of *msg* to the events journal (no-op without a loop)."""
|
"""Schedule an async write of *msg* to the events journal (no-op without a loop)."""
|
||||||
if _loop is None:
|
if _loop is None or not _loop.is_running():
|
||||||
return
|
return
|
||||||
from . import journal as journal_mod
|
from . import journal as journal_mod
|
||||||
ej = journal_mod.get_events_journal()
|
ej = journal_mod.get_events_journal()
|
||||||
|
|||||||
Reference in New Issue
Block a user