summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-06-06 14:45:17 +0100
committerGitHub <noreply@github.com>2019-06-06 14:45:17 +0100
commit71063a69b8a72576ae7587042f4c2f24fcbd6bcd (patch)
tree5e1f6c8c31687857867e19f5f2d22de37cddf1ab /synapse
parentMerge pull request #5221 from matrix-org/erikj/fix_worker_sytest (diff)
downloadsynapse-71063a69b8a72576ae7587042f4c2f24fcbd6bcd.tar.xz
Fix missing logcontext for PresenceHandler.on_shutdown. (#5369)
Fixes some warnings, and a scary-looking stacktrace when sytest kills the
process.
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/presence.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index e49c8203ef..557fb5f83d 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -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