URL-Encode password in broker_url
Needed to prevent connection errors if the password contains non-urlsafe characters. Dockerfile change because all the services using it are mirroring ./ in /app now anyway. Flower needs because it needs bookwyrm in order to read the celerywyrm config (because flower only allows overwriting broker_url from the command line and we want to do it in Python so we have access to a urlencode function).
This commit is contained in:
@ -14,8 +14,12 @@ PAGE_LENGTH = env("PAGE_LENGTH", 15)
|
||||
DEFAULT_LANGUAGE = env("DEFAULT_LANGUAGE", "English")
|
||||
|
||||
# celery
|
||||
CELERY_BROKER = env("CELERY_BROKER")
|
||||
CELERY_RESULT_BACKEND = env("CELERY_RESULT_BACKEND")
|
||||
CELERY_BROKER = "redis://:{}@redis_broker:{}/0".format(
|
||||
requests.utils.quote(env("REDIS_BROKER_PASSWORD", "")), env("REDIS_BROKER_PORT")
|
||||
)
|
||||
CELERY_RESULT_BACKEND = "redis://:{}@redis_broker:{}/0".format(
|
||||
requests.utils.quote(env("REDIS_BROKER_PASSWORD", "")), env("REDIS_BROKER_PORT")
|
||||
)
|
||||
CELERY_ACCEPT_CONTENT = ["application/json"]
|
||||
CELERY_TASK_SERIALIZER = "json"
|
||||
CELERY_RESULT_SERIALIZER = "json"
|
||||
|
Reference in New Issue
Block a user