mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 13:46:02 -04:00
Remove redundant run_as_background_process() from pusherpool
`on_new_notifications` and `on_new_receipts` in `HttpPusher` and `EmailPusher` now always return synchronously, so we can remove the `defer.gatherResults` on their results, and the `run_as_background_process` wrappers can be removed too because the PusherPool methods will now complete quickly enough.
This commit is contained in:
parent
c7273c11bc
commit
e7a16c6210
7 changed files with 12 additions and 48 deletions
|
@ -94,13 +94,12 @@ class EmailPusher(object):
|
|||
def on_new_notifications(self, min_stream_ordering, max_stream_ordering):
|
||||
self.max_stream_ordering = max(max_stream_ordering, self.max_stream_ordering)
|
||||
self._start_processing()
|
||||
return defer.succeed(None)
|
||||
|
||||
def on_new_receipts(self, min_stream_id, max_stream_id):
|
||||
# We could wake up and cancel the timer but there tend to be quite a
|
||||
# lot of read receipts so it's probably less work to just let the
|
||||
# timer fire
|
||||
return defer.succeed(None)
|
||||
pass
|
||||
|
||||
def on_timer(self):
|
||||
self.timed_call = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue