diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-07-27 12:21:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-27 12:21:34 -0400 |
commit | 8144bc26a7432463b7e70f9c03198d4724952522 (patch) | |
tree | a678eeec472c27e168dae14648e3ce269ff77377 /synapse/push/action_generator.py | |
parent | update changelog (diff) | |
download | synapse-8144bc26a7432463b7e70f9c03198d4724952522.tar.xz |
Convert push to async/await. (#7948)
Diffstat (limited to 'synapse/push/action_generator.py')
-rw-r--r-- | synapse/push/action_generator.py | 7 |
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) |