diff options
author | Erik Johnston <erik@matrix.org> | 2015-04-29 18:25:24 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-04-29 18:25:24 +0100 |
commit | c27d6ad6b5eaed43f1f20530a51f48ca2931063f (patch) | |
tree | c30d83d55c9d52ed1d7e8c059337d30f0ae4131b | |
parent | Start pushers on reactor thread (diff) | |
download | synapse-c27d6ad6b5eaed43f1f20530a51f48ca2931063f.tar.xz |
Only start pushers when synapse has fully started
Diffstat (limited to '')
-rwxr-xr-x | synapse/app/homeserver.py | 6 | ||||
-rw-r--r-- | synapse/push/pusherpool.py | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 5c6812f473..0987a76cfc 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -442,11 +442,15 @@ def setup(config_options): hs.start_listening() - hs.get_pusherpool().start() hs.get_state_handler().start_caching() hs.get_datastore().start_profiling() hs.get_replication_layer().start_get_pdu_cache() + def on_start(): + hs.get_pusherpool().start() + + reactor.callWhenRunning(on_start) + return hs diff --git a/synapse/push/pusherpool.py b/synapse/push/pusherpool.py index 2e58f70ffa..571d8b2f82 100644 --- a/synapse/push/pusherpool.py +++ b/synapse/push/pusherpool.py @@ -19,8 +19,6 @@ from twisted.internet import defer from httppusher import HttpPusher from synapse.push import PusherConfigException -from synapse.util.async import run_on_reactor - import logging logger = logging.getLogger(__name__) @@ -50,7 +48,6 @@ class PusherPool: @defer.inlineCallbacks def start(self): - yield run_on_reactor() pushers = yield self.store.get_all_pushers() self._start_pushers(pushers) |