diff --git a/bookwyrm/redis_store.py b/bookwyrm/redis_store.py index 3aec8bd68..595868ff5 100644 --- a/bookwyrm/redis_store.py +++ b/bookwyrm/redis_store.py @@ -11,6 +11,7 @@ r = redis.Redis( db=0, ) + class RedisStore(ABC): """sets of ranked, related objects, like statuses for a user's feed""" diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index 0242ba477..fcc9b51f7 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -127,7 +127,7 @@ CACHES = { "LOCATION": f"redis://:{REDIS_ACTIVITY_PASSWORD}@{REDIS_ACTIVITY_HOST}:{REDIS_ACTIVITY_PORT}/0", "OPTIONS": { "CLIENT_CLASS": "django_redis.client.DefaultClient", - } + }, } } SESSION_ENGINE = "django.contrib.sessions.backends.cache" diff --git a/celerywyrm/settings.py b/celerywyrm/settings.py index 082bb5db1..24729345b 100644 --- a/celerywyrm/settings.py +++ b/celerywyrm/settings.py @@ -7,9 +7,12 @@ REDIS_BROKER_PASSWORD = requests.utils.quote(env("REDIS_BROKER_PASSWORD", None)) REDIS_BROKER_HOST = env("REDIS_BROKER_HOST", "redis_broker") REDIS_BROKER_PORT = env("REDIS_BROKER_PORT", 6379) -# pylint: disable=line-too-long -CELERY_BROKER_URL = f"redis://:{REDIS_BROKER_PASSWORD}@{REDIS_BROKER_HOST}:{REDIS_BROKER_PORT}/0" -CELERY_RESULT_BACKEND = f"redis://:{REDIS_BROKER_PASSWORD}@{REDIS_BROKER_HOST}:{REDIS_BROKER_PORT}/0" +CELERY_BROKER_URL = ( + f"redis://:{REDIS_BROKER_PASSWORD}@{REDIS_BROKER_HOST}:{REDIS_BROKER_PORT}/0" +) +CELERY_RESULT_BACKEND = ( + f"redis://:{REDIS_BROKER_PASSWORD}@{REDIS_BROKER_HOST}:{REDIS_BROKER_PORT}/0" +) CELERY_DEFAULT_QUEUE = "low_priority"