summary refs log tree commit diff
path: root/synapse/config/database.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-03-20 10:55:55 +0000
committerErik Johnston <erik@matrix.org>2015-03-20 10:55:55 +0000
commit455579ca90dd5479dae785b5a1b9bdd201654ea6 (patch)
tree824b104ae83fcbf457288ba51e6673358690e1ad /synapse/config/database.py
parentFix up schemas some more (diff)
downloadsynapse-455579ca90dd5479dae785b5a1b9bdd201654ea6.tar.xz
Make database selection configurable
Diffstat (limited to 'synapse/config/database.py')
-rw-r--r--synapse/config/database.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/config/database.py b/synapse/config/database.py
index 87efe54645..8dc9873f8c 100644
--- a/synapse/config/database.py
+++ b/synapse/config/database.py
@@ -26,6 +26,11 @@ class DatabaseConfig(Config):
             self.database_path = self.abspath(args.database_path)
         self.event_cache_size = self.parse_size(args.event_cache_size)
 
+        if args.database_config:
+            self.database_config = self.abspath(args.database_config)
+        else:
+            self.database_config = None
+
     @classmethod
     def add_arguments(cls, parser):
         super(DatabaseConfig, cls).add_arguments(parser)
@@ -38,6 +43,10 @@ class DatabaseConfig(Config):
             "--event-cache-size", default="100K",
             help="Number of events to cache in memory."
         )
+        db_group.add_argument(
+            "--database-config", default=None,
+            help="Location of the database configuration file."
+        )
 
     @classmethod
     def generate_config(cls, args, config_dir_path):