summary refs log tree commit diff
path: root/synapse/app/federation_sender.py
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2018-01-27 17:56:25 +0100
committerGitHub <noreply@github.com>2018-01-27 17:56:25 +0100
commit4b0f06e99c00ea092046a591797de4b12a1314c3 (patch)
treef536d77545fbec5504f8c3b42e2627809bd50b7c /synapse/app/federation_sender.py
parentMerge pull request #2827 from matrix-org/fix_server_500_on_public_rooms_call_... (diff)
parentFactor out get_db_conn to HomeServer base class (diff)
downloadsynapse-4b0f06e99c00ea092046a591797de4b12a1314c3.tar.xz
Merge pull request #2830 from matrix-org/rav/factor_out_get_conn
Factor out get_db_conn to HomeServer base class
Diffstat (limited to 'synapse/app/federation_sender.py')
-rw-r--r--synapse/app/federation_sender.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/synapse/app/federation_sender.py b/synapse/app/federation_sender.py
index 09e9488f06..f760826d27 100644
--- a/synapse/app/federation_sender.py
+++ b/synapse/app/federation_sender.py
@@ -76,19 +76,6 @@ class FederationSenderSlaveStore(
 
 
 class FederationSenderServer(HomeServer):
-    def get_db_conn(self, run_new_connection=True):
-        # Any param beginning with cp_ is a parameter for adbapi, and should
-        # not be passed to the database engine.
-        db_params = {
-            k: v for k, v in self.db_config.get("args", {}).items()
-            if not k.startswith("cp_")
-        }
-        db_conn = self.database_engine.module.connect(**db_params)
-
-        if run_new_connection:
-            self.database_engine.on_new_connection(db_conn)
-        return db_conn
-
     def setup(self):
         logger.info("Setting up.")
         self.datastore = FederationSenderSlaveStore(self.get_db_conn(), self)