diff options
author | Erik Johnston <erik@matrix.org> | 2017-04-11 11:12:37 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-04-11 11:12:37 +0100 |
commit | 4902db1fc978d1c9a3681720cffc4dbb9d72dbea (patch) | |
tree | ee78b86f62119a7605ab2fdd1bc8afd3953e7978 /synapse/app/client_reader.py | |
parent | Merge branch 'release-v0.19.3' of github.com:matrix-org/synapse (diff) | |
parent | Bump changelog (diff) | |
download | synapse-4902db1fc978d1c9a3681720cffc4dbb9d72dbea.tar.xz |
Merge branch 'release-v0.20.0' of github.com:matrix-org/synapse v0.20.0
Diffstat (limited to 'synapse/app/client_reader.py')
-rw-r--r-- | synapse/app/client_reader.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/synapse/app/client_reader.py b/synapse/app/client_reader.py index 4d081eccd1..e4ea3ab933 100644 --- a/synapse/app/client_reader.py +++ b/synapse/app/client_reader.py @@ -29,13 +29,14 @@ from synapse.replication.slave.storage.keys import SlavedKeyStore from synapse.replication.slave.storage.room import RoomStore from synapse.replication.slave.storage.directory import DirectoryStore from synapse.replication.slave.storage.registration import SlavedRegistrationStore +from synapse.replication.slave.storage.transactions import TransactionStore from synapse.rest.client.v1.room import PublicRoomListRestServlet from synapse.server import HomeServer from synapse.storage.client_ips import ClientIpStore from synapse.storage.engines import create_engine from synapse.util.async import sleep from synapse.util.httpresourcetree import create_resource_tree -from synapse.util.logcontext import LoggingContext +from synapse.util.logcontext import LoggingContext, PreserveLoggingContext from synapse.util.manhole import manhole from synapse.util.rlimit import change_resource_limit from synapse.util.versionstring import get_version_string @@ -63,6 +64,7 @@ class ClientReaderSlavedStore( DirectoryStore, SlavedApplicationServiceStore, SlavedRegistrationStore, + TransactionStore, BaseSlavedStore, ClientIpStore, # After BaseSlavedStore because the constructor is different ): @@ -171,7 +173,7 @@ def start(config_options): assert config.worker_app == "synapse.app.client_reader" - setup_logging(config.worker_log_config, config.worker_log_file) + setup_logging(config, use_worker_options=True) events.USE_FROZEN_DICTS = config.use_frozen_dicts @@ -193,7 +195,11 @@ def start(config_options): ss.start_listening(config.worker_listeners) def run(): - with LoggingContext("run"): + # make sure that we run the reactor with the sentinel log context, + # otherwise other PreserveLoggingContext instances will get confused + # and complain when they see the logcontext arbitrarily swapping + # between the sentinel and `run` logcontexts. + with PreserveLoggingContext(): logger.info("Running") change_resource_limit(config.soft_file_limit) if config.gc_thresholds: |