2021-05-10 21:19:50 +00:00
|
|
|
""" bookwyrm settings and configuration """
|
2021-09-07 20:51:59 +00:00
|
|
|
# pylint: disable=wildcard-import
|
|
|
|
# pylint: disable=unused-wildcard-import
|
2021-05-10 21:19:50 +00:00
|
|
|
from bookwyrm.settings import *
|
2020-03-31 23:31:33 +00:00
|
|
|
|
2022-02-26 18:13:44 +00:00
|
|
|
# pylint: disable=line-too-long
|
2023-01-26 16:18:15 +00:00
|
|
|
REDIS_BROKER_PASSWORD = requests.utils.quote(env("REDIS_BROKER_PASSWORD", ""))
|
2022-01-05 16:27:39 +00:00
|
|
|
REDIS_BROKER_HOST = env("REDIS_BROKER_HOST", "redis_broker")
|
|
|
|
REDIS_BROKER_PORT = env("REDIS_BROKER_PORT", 6379)
|
2022-01-13 16:15:24 +00:00
|
|
|
REDIS_BROKER_DB_INDEX = env("REDIS_BROKER_DB_INDEX", 0)
|
2023-01-14 23:44:10 +00:00
|
|
|
REDIS_BROKER_URL = env(
|
|
|
|
"REDIS_BROKER_URL",
|
2023-01-15 02:20:37 +00:00
|
|
|
f"redis://:{REDIS_BROKER_PASSWORD}@{REDIS_BROKER_HOST}:{REDIS_BROKER_PORT}/{REDIS_BROKER_DB_INDEX}",
|
2023-01-14 23:44:10 +00:00
|
|
|
)
|
2022-01-05 16:27:39 +00:00
|
|
|
|
2023-01-14 23:44:10 +00:00
|
|
|
CELERY_BROKER_URL = REDIS_BROKER_URL.replace("unix:", "redis+socket:")
|
|
|
|
CELERY_RESULT_BACKEND = REDIS_BROKER_URL.replace("unix:", "redis+socket:")
|
2021-09-07 20:51:59 +00:00
|
|
|
|
2021-09-08 00:11:32 +00:00
|
|
|
CELERY_DEFAULT_QUEUE = "low_priority"
|
2022-03-17 16:57:25 +00:00
|
|
|
CELERY_CREATE_MISSING_QUEUES = True
|
2021-09-07 23:06:54 +00:00
|
|
|
|
2021-03-08 16:49:10 +00:00
|
|
|
CELERY_ACCEPT_CONTENT = ["json"]
|
|
|
|
CELERY_TASK_SERIALIZER = "json"
|
2021-09-07 20:51:59 +00:00
|
|
|
CELERY_RESULT_SERIALIZER = "json"
|
2022-02-26 18:13:44 +00:00
|
|
|
|
|
|
|
CELERY_BEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler"
|
|
|
|
CELERY_TIMEZONE = env("TIME_ZONE", "UTC")
|
|
|
|
|
2021-05-24 04:49:12 +00:00
|
|
|
FLOWER_PORT = env("FLOWER_PORT")
|
2020-03-31 23:31:33 +00:00
|
|
|
|
2021-05-10 21:19:50 +00:00
|
|
|
INSTALLED_APPS = INSTALLED_APPS + [
|
2021-03-08 16:49:10 +00:00
|
|
|
"celerywyrm",
|
2020-03-31 23:31:33 +00:00
|
|
|
]
|
|
|
|
|
2021-03-08 16:49:10 +00:00
|
|
|
ROOT_URLCONF = "celerywyrm.urls"
|
2020-03-31 23:31:33 +00:00
|
|
|
|
2021-03-08 16:49:10 +00:00
|
|
|
WSGI_APPLICATION = "celerywyrm.wsgi.application"
|