summary refs log tree commit diff
path: root/synapse/push/pusherpool.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-04-22 11:34:08 +0100
committerMark Haines <mjark@negativecurvature.net>2016-04-22 11:34:08 +0100
commit2022ae0fb93e4ce0bc4b031a325abf5938ae7118 (patch)
tree4d4f0b55c76167585127b011320af2dcccc4f9cb /synapse/push/pusherpool.py
parentMerge pull request #745 from matrix-org/erikj/search-index (diff)
parentOptionally split out the pushers into a separate process (diff)
downloadsynapse-2022ae0fb93e4ce0bc4b031a325abf5938ae7118.tar.xz
Merge pull request #746 from matrix-org/markjh/split_out_pusher
Optionally split out the pushers into a separate process
Diffstat (limited to 'synapse/push/pusherpool.py')
-rw-r--r--synapse/push/pusherpool.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/push/pusherpool.py b/synapse/push/pusherpool.py
index aa095f9d9b..6ef48d63f7 100644
--- a/synapse/push/pusherpool.py
+++ b/synapse/push/pusherpool.py
@@ -29,6 +29,7 @@ logger = logging.getLogger(__name__)
 class PusherPool:
     def __init__(self, _hs):
         self.hs = _hs
+        self.start_pushers = _hs.config.start_pushers
         self.store = self.hs.get_datastore()
         self.clock = self.hs.get_clock()
         self.pushers = {}
@@ -177,6 +178,9 @@ class PusherPool:
             self._start_pushers([p])
 
     def _start_pushers(self, pushers):
+        if not self.start_pushers:
+            logger.info("Not starting pushers because they are disabled in the config")
+            return
         logger.info("Starting %d pushers", len(pushers))
         for pusherdict in pushers:
             try: