Use typecasting env functions
Many of these environment variables were probably not actually usable, since they would be strings if set in the env file. Using the typecasting functions fixes this, and generally shows the intention of the code more clearly.
This commit is contained in:
parent
ded3f469ef
commit
b3d3de5374
2 changed files with 11 additions and 11 deletions
|
@ -6,8 +6,8 @@ from bookwyrm.settings import *
|
|||
# pylint: disable=line-too-long
|
||||
REDIS_BROKER_PASSWORD = requests.utils.quote(env("REDIS_BROKER_PASSWORD", ""))
|
||||
REDIS_BROKER_HOST = env("REDIS_BROKER_HOST", "redis_broker")
|
||||
REDIS_BROKER_PORT = env("REDIS_BROKER_PORT", 6379)
|
||||
REDIS_BROKER_DB_INDEX = env("REDIS_BROKER_DB_INDEX", 0)
|
||||
REDIS_BROKER_PORT = env.int("REDIS_BROKER_PORT", 6379)
|
||||
REDIS_BROKER_DB_INDEX = env.int("REDIS_BROKER_DB_INDEX", 0)
|
||||
REDIS_BROKER_URL = env(
|
||||
"REDIS_BROKER_URL",
|
||||
f"redis://:{REDIS_BROKER_PASSWORD}@{REDIS_BROKER_HOST}:{REDIS_BROKER_PORT}/{REDIS_BROKER_DB_INDEX}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue