mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 10:03:47 +01:00
Fix missing logcontext for PresenceHandler.on_shutdown. (#5369)
Fixes some warnings, and a scary-looking stacktrace when sytest kills the process.
This commit is contained in:
parent
89d3d7b2c0
commit
71063a69b8
2 changed files with 8 additions and 1 deletions
1
changelog.d/5369.bugfix
Normal file
1
changelog.d/5369.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix missing logcontext warnings on shutdown.
|
|
@ -158,7 +158,13 @@ class PresenceHandler(object):
|
|||
# have not yet been persisted
|
||||
self.unpersisted_users_changes = set()
|
||||
|
||||
hs.get_reactor().addSystemEventTrigger("before", "shutdown", self._on_shutdown)
|
||||
hs.get_reactor().addSystemEventTrigger(
|
||||
"before",
|
||||
"shutdown",
|
||||
run_as_background_process,
|
||||
"presence.on_shutdown",
|
||||
self._on_shutdown,
|
||||
)
|
||||
|
||||
self.serial_to_user = {}
|
||||
self._next_serial = 1
|
||||
|
|
Loading…
Reference in a new issue