1
0
mirror of https://github.com/etesync/server synced 2024-11-25 18:28:46 +00:00

Easy config: add support for setting redis URI.

This commit is contained in:
Tom Hacohen 2021-01-28 17:55:37 +02:00
parent ef69954b6d
commit 8485806046
2 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,7 @@ debug = false
;media_url = /user-media/ ;media_url = /user-media/
;language_code = en-us ;language_code = en-us
;time_zone = UTC ;time_zone = UTC
;redis_uri = redis://localhost:6379
[allowed_hosts] [allowed_hosts]
allowed_host1 = example.com allowed_host1 = example.com

View File

@ -154,6 +154,9 @@ if any(os.path.isfile(x) for x in config_locations):
TIME_ZONE = section.get("time_zone", TIME_ZONE) TIME_ZONE = section.get("time_zone", TIME_ZONE)
DEBUG = section.getboolean("debug", DEBUG) DEBUG = section.getboolean("debug", DEBUG)
if "redis_uri" in section:
ETEBASE_REDIS_URI = section.get("redis_uri")
if "allowed_hosts" in config: if "allowed_hosts" in config:
ALLOWED_HOSTS = [y for x, y in config.items("allowed_hosts")] ALLOWED_HOSTS = [y for x, y in config.items("allowed_hosts")]