summary refs log tree commit diff
path: root/synapse/push/emailpusher.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-04-02 18:25:45 +0100
committerErik Johnston <erik@matrix.org>2019-04-02 18:25:45 +0100
commit613b443ff006c464b9d9fe839c912661b51c4940 (patch)
tree9efde7a05c9a1a1f2517ef4789d54e27a322865a /synapse/push/emailpusher.py
parentRemove spurious changelog files from hotfixes (diff)
parentMerge pull request #4991 from matrix-org/erikj/stagger_push_startup (diff)
downloadsynapse-613b443ff006c464b9d9fe839c912661b51c4940.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'synapse/push/emailpusher.py')
-rw-r--r--synapse/push/emailpusher.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/synapse/push/emailpusher.py b/synapse/push/emailpusher.py

index 50e1007d84..e8ee67401f 100644 --- a/synapse/push/emailpusher.py +++ b/synapse/push/emailpusher.py
@@ -72,8 +72,15 @@ class EmailPusher(object): self._is_processing = False - def on_started(self): - if self.mailer is not None: + def on_started(self, should_check_for_notifs): + """Called when this pusher has been started. + + Args: + should_check_for_notifs (bool): Whether we should immediately + check for push to send. Set to False only if it's known there + is nothing to send + """ + if should_check_for_notifs and self.mailer is not None: self._start_processing() def on_stop(self):