summary refs log tree commit diff
path: root/synapse/handlers/presence.py (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-10-22Run PusherPool.start as a background processRichard van der Hoff1-5/+7
We don't do anything with the result, so this is needed to give this code a logcontext.
2018-10-22Make on_started synchronous tooRichard van der Hoff3-11/+21
This brings it into line with on_new_notifications and on_new_receipts. It requires a little bit of hoop-jumping in EmailPusher to load the throttle params before the first loop.
2018-10-22Remove redundant run_as_background_process() from pusherpoolRichard van der Hoff7-50/+14
`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.
2018-10-22Give pushers their own background logcontextRichard van der Hoff2-58/+54
Each pusher has its own loop which runs for as long as it has work to do. This should run in its own background thread with its own logcontext, as other similar loops elsewhere in the system do - which means that CPU usage is consistently attributed to that loop, rather than to whatever request happened to start the loop.
2018-10-22move get_all_pushers call downRichard van der Hoff1-3/+9
simplifies the interface to _start_pushers
2018-10-22Factor PusherPool._start_pusher out of _start_pushersRichard van der Hoff1-18/+33
... and use it from start_pusher_by_id. This mostly simplifies start_pusher_by_id.
2018-10-22Rename _refresh_pusherRichard van der Hoff2-3/+4
This is public (or at least, called from outside the class), so ought to have a better name.
2018-10-19Remove notes on fallback for email_templatesRichard van der Hoff2-8/+0
This fallback didn't work, and was removed in #4069.
2018-10-19