summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-11-08 11:32:22 +0000
committerGitHub <noreply@github.com>2016-11-08 11:32:22 +0000
commit34449cfc6c6ffbd279b910363bece0c3584d17ea (patch)
treed66128895262ea569056b67163aab9ec9a1dd385
parentMerge pull request #1198 from euank/more-ip-blacklist (diff)
parentRespect use_frozen_dicts option in workers (diff)
downloadsynapse-34449cfc6c6ffbd279b910363bece0c3584d17ea.tar.xz
Merge pull request #1616 from matrix-org/erikj/worker_frozen_dict
Respect use_frozen_dicts option in workers
-rw-r--r--synapse/app/appservice.py4
-rw-r--r--synapse/app/client_reader.py4
-rw-r--r--synapse/app/federation_reader.py4
-rw-r--r--synapse/app/media_repository.py4
-rw-r--r--synapse/app/pusher.py4
-rw-r--r--synapse/app/synchrotron.py2
6 files changed, 22 insertions, 0 deletions
diff --git a/synapse/app/appservice.py b/synapse/app/appservice.py
index 4e62a84b28..dd9ee406a1 100644
--- a/synapse/app/appservice.py
+++ b/synapse/app/appservice.py
@@ -34,6 +34,8 @@ from synapse.util.manhole import manhole
 from synapse.util.rlimit import change_resource_limit
 from synapse.util.versionstring import get_version_string
 
+from synapse import events
+
 from twisted.internet import reactor, defer
 from twisted.web.resource import Resource
 
@@ -151,6 +153,8 @@ def start(config_options):
 
     setup_logging(config.worker_log_config, config.worker_log_file)
 
+    events.USE_FROZEN_DICTS = config.use_frozen_dicts
+
     database_engine = create_engine(config.database_config)
 
     if config.notify_appservices:
diff --git a/synapse/app/client_reader.py b/synapse/app/client_reader.py
index 9fccc73db3..0086a2977e 100644
--- a/synapse/app/client_reader.py
+++ b/synapse/app/client_reader.py
@@ -41,6 +41,8 @@ from synapse.util.rlimit import change_resource_limit
 from synapse.util.versionstring import get_version_string
 from synapse.crypto import context_factory
 
+from synapse import events
+
 
 from twisted.internet import reactor, defer
 from twisted.web.resource import Resource
@@ -165,6 +167,8 @@ def start(config_options):
 
     setup_logging(config.worker_log_config, config.worker_log_file)
 
+    events.USE_FROZEN_DICTS = config.use_frozen_dicts
+
     database_engine = create_engine(config.database_config)
 
     tls_server_context_factory = context_factory.ServerContextFactory(config)
diff --git a/synapse/app/federation_reader.py b/synapse/app/federation_reader.py
index 1f5ae1937e..b5f59a9931 100644
--- a/synapse/app/federation_reader.py
+++ b/synapse/app/federation_reader.py
@@ -39,6 +39,8 @@ from synapse.api.urls import FEDERATION_PREFIX
 from synapse.federation.transport.server import TransportLayerServer
 from synapse.crypto import context_factory
 
+from synapse import events
+
 
 from twisted.internet import reactor, defer
 from twisted.web.resource import Resource
@@ -156,6 +158,8 @@ def start(config_options):
 
     setup_logging(config.worker_log_config, config.worker_log_file)
 
+    events.USE_FROZEN_DICTS = config.use_frozen_dicts
+
     database_engine = create_engine(config.database_config)
 
     tls_server_context_factory = context_factory.ServerContextFactory(config)
diff --git a/synapse/app/media_repository.py b/synapse/app/media_repository.py
index 6e5ec01c6c..44c19a1bef 100644
--- a/synapse/app/media_repository.py
+++ b/synapse/app/media_repository.py
@@ -41,6 +41,8 @@ from synapse.api.urls import (
 )
 from synapse.crypto import context_factory
 
+from synapse import events
+
 
 from twisted.internet import reactor, defer
 from twisted.web.resource import Resource
@@ -162,6 +164,8 @@ def start(config_options):
 
     setup_logging(config.worker_log_config, config.worker_log_file)
 
+    events.USE_FROZEN_DICTS = config.use_frozen_dicts
+
     database_engine = create_engine(config.database_config)
 
     tls_server_context_factory = context_factory.ServerContextFactory(config)
diff --git a/synapse/app/pusher.py b/synapse/app/pusher.py
index 1a6f5507a9..a0e765c54f 100644
--- a/synapse/app/pusher.py
+++ b/synapse/app/pusher.py
@@ -36,6 +36,8 @@ from synapse.util.manhole import manhole
 from synapse.util.rlimit import change_resource_limit
 from synapse.util.versionstring import get_version_string
 
+from synapse import events
+
 from twisted.internet import reactor, defer
 from twisted.web.resource import Resource
 
@@ -239,6 +241,8 @@ def start(config_options):
 
     setup_logging(config.worker_log_config, config.worker_log_file)
 
+    events.USE_FROZEN_DICTS = config.use_frozen_dicts
+
     if config.start_pushers:
         sys.stderr.write(
             "\nThe pushers must be disabled in the main synapse process"
diff --git a/synapse/app/synchrotron.py b/synapse/app/synchrotron.py
index 64b209ffe6..bf1b995dc2 100644
--- a/synapse/app/synchrotron.py
+++ b/synapse/app/synchrotron.py
@@ -446,6 +446,8 @@ def start(config_options):
 
     setup_logging(config.worker_log_config, config.worker_log_file)
 
+    synapse.events.USE_FROZEN_DICTS = config.use_frozen_dicts
+
     database_engine = create_engine(config.database_config)
 
     ss = SynchrotronServer(