Fix "Re-starting finished log context" spam when creating events (#14947)
`run_in_background` calls re-use the current logging context. When they are not awaited, they can complete after the current logging context has been marked as finished, which leads to log spam. Use `run_as_background_process` instead. Fixes one of the instances of #13090. Signed-off-by: Sean Quah <seanq@matrix.org>pull/14952/head
parent
6d14fdc271
commit
805b641fb6
|
@ -0,0 +1 @@
|
||||||
|
Fix a long-standing bug where sending messages on servers with presence enabled would spam "Re-starting finished log context" log lines.
|
|
@ -1939,7 +1939,9 @@ class EventCreationHandler:
|
||||||
if event.type == EventTypes.Message:
|
if event.type == EventTypes.Message:
|
||||||
# We don't want to block sending messages on any presence code. This
|
# We don't want to block sending messages on any presence code. This
|
||||||
# matters as sometimes presence code can take a while.
|
# matters as sometimes presence code can take a while.
|
||||||
run_in_background(self._bump_active_time, requester.user)
|
run_as_background_process(
|
||||||
|
"bump_presence_active_time", self._bump_active_time, requester.user
|
||||||
|
)
|
||||||
|
|
||||||
async def _notify() -> None:
|
async def _notify() -> None:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue