bookwyrm-mastodon/celerywyrm/settings.py

34 lines
1.1 KiB
Python
Raw Normal View History

""" bookwyrm settings and configuration """
2021-09-07 16:51:59 -04:00
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import
from bookwyrm.settings import *
2022-02-26 13:13:44 -05:00
# pylint: disable=line-too-long
2022-01-05 11:27:39 -05:00
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)
REDIS_BROKER_DB_INDEX = env("REDIS_BROKER_DB_INDEX", 0)
2022-01-05 11:27:39 -05:00
CELERY_BROKER_URL = f"redis://:{REDIS_BROKER_PASSWORD}@{REDIS_BROKER_HOST}:{REDIS_BROKER_PORT}/{REDIS_BROKER_DB_INDEX}"
CELERY_RESULT_BACKEND = f"redis://:{REDIS_BROKER_PASSWORD}@{REDIS_BROKER_HOST}:{REDIS_BROKER_PORT}/{REDIS_BROKER_DB_INDEX}"
2021-09-07 16:51:59 -04:00
2021-09-07 20:11:32 -04:00
CELERY_DEFAULT_QUEUE = "low_priority"
CELERY_CREATE_MISSING_QUEUES = True
2021-09-07 19:06:54 -04:00
2021-03-08 11:49:10 -05:00
CELERY_ACCEPT_CONTENT = ["json"]
CELERY_TASK_SERIALIZER = "json"
2021-09-07 16:51:59 -04:00
CELERY_RESULT_SERIALIZER = "json"
2022-02-26 13:13:44 -05:00
CELERY_BEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler"
CELERY_TIMEZONE = env("TIME_ZONE", "UTC")
FLOWER_PORT = env("FLOWER_PORT")
INSTALLED_APPS = INSTALLED_APPS + [
2021-03-08 11:49:10 -05:00
"celerywyrm",
]
2021-03-08 11:49:10 -05:00
ROOT_URLCONF = "celerywyrm.urls"
2021-03-08 11:49:10 -05:00
WSGI_APPLICATION = "celerywyrm.wsgi.application"