summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2020-08-13 17:05:31 +0100
committerGitHub <noreply@github.com>2020-08-13 17:05:31 +0100
commit53834bb9c4189fd0eeffd5981ca9829f6c399b29 (patch)
treed737d988005bd9a6b51790e521113b84eb581253 /synapse/handlers/message.py
parentDrop federation transmission queues during a significant remote outage. (#7864) (diff)
downloadsynapse-53834bb9c4189fd0eeffd5981ca9829f6c399b29.tar.xz
Run `remove_push_actions_from_staging` in foreground (#8081)
If we got an error persisting an event, we would try to remove the push actions
asynchronously, which would lead to a 'Re-starting finished log context'
warning.

I don't think there's any need for this to be asynchronous.
Diffstat (limited to '')
-rw-r--r--synapse/handlers/message.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 2643438e84..48b0fc7279 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -891,9 +891,7 @@ class EventCreationHandler(object):
         except Exception:
             # Ensure that we actually remove the entries in the push actions
             # staging area, if we calculated them.
-            run_in_background(
-                self.store.remove_push_actions_from_staging, event.event_id
-            )
+            await self.store.remove_push_actions_from_staging(event.event_id)
             raise
 
     async def _validate_canonical_alias(