From 9266d7085998dd62c7bc0b97b6573b780e893547 Mon Sep 17 00:00:00 2001 From: D Anzorge Date: Tue, 8 Jun 2021 23:50:58 +0200 Subject: [PATCH] Revert some env var changes from upstream * CELERY_BROKER/CELERY_RESULT_BACKEND are back to being supplied verbatim. This has been changed in upstream to allow urlencoding the password inside the app, but is tied to the Docker setup, and we generate the URL inside the NixOS module, so we can go back to providing the URLs inside env vars directly, which works for us, though isn't more generic than upstream's solution. * FLOWER_PORT was deleted from required env vars. The NixOS module supplies the commandline switches to Flower, and we also use a Unix socket by default there. --- bookwyrm/settings.py | 8 ++------ celerywyrm/settings.py | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index cbcf51368..490600c0c 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -14,12 +14,8 @@ PAGE_LENGTH = env("PAGE_LENGTH", 15) DEFAULT_LANGUAGE = env("DEFAULT_LANGUAGE", "English") # celery -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_BROKER = env("CELERY_BROKER") +CELERY_RESULT_BACKEND = env("CELERY_RESULT_BACKEND") CELERY_ACCEPT_CONTENT = ["application/json"] CELERY_TASK_SERIALIZER = "json" CELERY_RESULT_SERIALIZER = "json" diff --git a/celerywyrm/settings.py b/celerywyrm/settings.py index 107a39572..829fb6822 100644 --- a/celerywyrm/settings.py +++ b/celerywyrm/settings.py @@ -4,7 +4,6 @@ from bookwyrm.settings import * CELERY_BROKER_URL = CELERY_BROKER CELERY_ACCEPT_CONTENT = ["json"] CELERY_TASK_SERIALIZER = "json" -FLOWER_PORT = env("FLOWER_PORT") INSTALLED_APPS = INSTALLED_APPS + [ "celerywyrm",