Erik Johnston
0ea52872ab
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-02-22 15:29:41 +00:00
Erik Johnston
b82c9cf462
Add missing return
2019-02-22 15:27:40 +00:00
Erik Johnston
f2891d2487
Correctly handle PusherConfigException
2019-02-22 15:18:19 +00:00
Erik Johnston
a164134a53
Drop logging level of creating a pusher
2019-02-22 14:48:06 +00:00
Erik Johnston
1d9df51ff1
Correctly handle null data in HttpPusher
2019-02-22 14:47:48 +00:00
Richard van der Hoff
e07384c4e1
Add prometheus metrics for number of badge update pushes. ( #4709 )
...
We're counting the number of push notifications, but not the number of badges;
I'd like to see if they are significant.
2019-02-22 10:57:15 +00:00
Richard van der Hoff
0abb094f1a
bail out early in on_new_receipts if no pushers ( #4706 )
2019-02-21 17:51:21 +00:00
Richard van der Hoff
6868d53fe9
bail out early in on_new_receipts if no pushers
2019-02-21 15:58:15 +00:00
Richard van der Hoff
4da63d9f6f
Merge branch 'develop' into matrix-org-hotfixes
2019-02-20 14:15:56 +00:00
Richard van der Hoff
b2200a8690
Logging improvements for the pusher ( #4691 )
2019-02-20 11:36:50 +00:00
Richard van der Hoff
085d69b0bd
Apply the pusher http hack in the right place ( #4692 )
...
Do it in the constructor, so that it works for badge updates as well as pushes
2019-02-20 11:25:10 +00:00
Erik Johnston
d351be1567
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-01-30 11:48:29 +00:00
Amber Brown
3f189c902e
Fix flake8 ( #4519 )
2019-01-30 10:53:17 +00:00
Richard van der Hoff
3dd704ee9a
Merge branch 'develop' into matrix-org-hotfixes
2018-11-20 11:29:45 +00:00
Richard van der Hoff
f5faf6bc14
Fix logcontext leak in EmailPusher
2018-11-19 17:07:01 +00:00
Richard van der Hoff
34406cf22c
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2018-11-06 10:49:20 +00:00
Erik Johnston
b86d05a279
Clean up event accesses and tests
...
This is in preparation to refactor FrozenEvent to support different
event formats for different room versions
2018-11-02 13:44:14 +00:00
Amber Brown
f91aefd245
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2018-10-31 04:41:03 +11:00
Amber Brown
0dce9e1379
Write some tests for the email pusher ( #4095 )
2018-10-30 23:55:43 +11:00
Erik Johnston
9f2d14ee26
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-10-26 09:52:23 +01:00
Richard van der Hoff
c573794b22
Fix start_pushers vs _start_pushers confusion
2018-10-24 09:24:55 +01:00
Richard van der Hoff
e564306e31
sanity-check the is_processing flag
...
... and rename it, for even more sanity
2018-10-24 09:23:33 +01:00
Richard van der Hoff
026cd91ac8
Run PusherPool.start as a background process
...
We don't do anything with the result, so this is needed to give this code a
logcontext.
2018-10-22 16:12:11 +01:00
Richard van der Hoff
f749607c91
Make on_started synchronous too
...
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-22 16:12:11 +01:00
Richard van der Hoff
e7a16c6210
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.
2018-10-22 16:12:11 +01:00
Richard van der Hoff
c7273c11bc
Give pushers their own background logcontext
...
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-22 16:12:11 +01:00
Richard van der Hoff
5110f4e425
move get_all_pushers call down
...
simplifies the interface to _start_pushers
2018-10-22 16:12:11 +01:00
Richard van der Hoff
04277d0ed8
Factor PusherPool._start_pusher out of _start_pushers
...
... and use it from start_pusher_by_id. This mostly simplifies
start_pusher_by_id.
2018-10-22 16:12:11 +01:00
Richard van der Hoff
3e8b02c939
Rename _refresh_pusher
...
This is public (or at least, called from outside the class), so ought to have a
better name.
2018-10-22 16:12:11 +01:00
Amber Brown
ead471e72d
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2018-10-22 22:18:02 +11:00
Richard van der Hoff
cc325c7069
Calculate absolute path for email templates
2018-10-19 14:01:59 +01:00
Richard van der Hoff
9a4011de46
Merge branch 'develop' into matrix-org-hotfixes
2018-10-18 16:37:01 +01:00
Richard van der Hoff
1519572961
Ship the email templates as package_data
...
move the example email templates into the synapse package so that they can be
used as package data, which should mean that all of the packaging mechanisms
(pip, docker, debian, arch, etc) should now come with the example templates.
In order to grandfather in people who relied on the templates being in the old
place, check for that situation and fall back to using the defaults if the
templates directory does not exist.
2018-10-17 16:46:02 +01:00
Michael Kaye
128043072b
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-09-24 11:20:10 +01:00
Erik Johnston
b5eef203f4
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-09-14 18:25:55 +01:00
Neil Johnson
7de1989ea2
fix link for case that config.email_riot_base_url is set
2018-09-13 22:43:50 +01:00
Amber Brown
7c27c4d51c
merge ( #3576 )
2018-09-14 03:11:11 +10:00
Erik Johnston
f5abc10724
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-08-20 11:12:18 +01:00
Richard van der Hoff
66f7dc8c87
Fix logcontexts for running pushers
...
First of all, avoid resetting the logcontext before running the pushers, to fix
the "Starting db txn 'get_all_updated_receipts' from sentinel context" warning.
Instead, give them their own "background process" logcontexts.
2018-08-17 00:32:39 +01:00
Erik Johnston
4dd0604f61
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-08-15 15:37:05 +01:00
Amber Brown
b37c472419
Rename async to async_helpers because `async` is a keyword on Python 3.7 ( #3678 )
2018-08-10 23:50:21 +10:00
Erik Johnston
b136d7ff8f
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-07-23 16:09:40 +01:00
Erik Johnston
e42510ba63
Use new getters
2018-07-23 13:17:22 +01:00
Richard van der Hoff
f04e35c170
Merge branch 'develop' into matrix-org-hotfixes
2018-07-10 18:04:03 +01:00
Amber Brown
49af402019
run isort
2018-07-09 16:09:20 +10:00
Erik Johnston
4c22c9b0b6
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-06-25 14:37:13 +01:00
Amber Brown
07cad26d65
Remove all global reactor imports & pass it around explicitly ( #3424 )
2018-06-25 14:08:28 +01:00
aphrodite
9e38981ae4
Send HTTP pushes direct to http-priv rather than via clouldflare
...
(This is a heinous hack that ought to be made more generic and pushed back to develop)
2018-06-22 15:58:15 +01:00
Amber Brown
a61738b316
Remove run_on_reactor ( #3395 )
2018-06-14 18:27:37 +10:00
Amber Brown
c936a52a9e
Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy ( #3307 )
2018-05-31 19:03:47 +10:00