summary refs log tree commit diff
path: root/synapse/push/action_generator.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-07-27 12:21:34 -0400
committerGitHub <noreply@github.com>2020-07-27 12:21:34 -0400
commit8144bc26a7432463b7e70f9c03198d4724952522 (patch)
treea678eeec472c27e168dae14648e3ce269ff77377 /synapse/push/action_generator.py
parentupdate changelog (diff)
downloadsynapse-8144bc26a7432463b7e70f9c03198d4724952522.tar.xz
Convert push to async/await. (#7948)
Diffstat (limited to 'synapse/push/action_generator.py')
-rw-r--r--synapse/push/action_generator.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/synapse/push/action_generator.py b/synapse/push/action_generator.py
index 1ffd5e2df3..0d23142653 100644
--- a/synapse/push/action_generator.py
+++ b/synapse/push/action_generator.py
@@ -15,8 +15,6 @@
 
 import logging
 
-from twisted.internet import defer
-
 from synapse.util.metrics import Measure
 
 from .bulk_push_rule_evaluator import BulkPushRuleEvaluator
@@ -37,7 +35,6 @@ class ActionGenerator(object):
         # event stream, so we just run the rules for a client with no profile
         # tag (ie. we just need all the users).
 
-    @defer.inlineCallbacks
-    def handle_push_actions_for_event(self, event, context):
+    async def handle_push_actions_for_event(self, event, context):
         with Measure(self.clock, "action_for_event_by_user"):
-            yield self.bulk_evaluator.action_for_event_by_user(event, context)
+            await self.bulk_evaluator.action_for_event_by_user(event, context)