mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:06:08 -04:00
Make database selection configurable
This commit is contained in:
parent
0d0610870d
commit
455579ca90
2 changed files with 42 additions and 11 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue