mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-22 09:31:08 +00:00
Remove unused code from celery
This commit is contained in:
parent
c0b662cbd7
commit
7b2e4eebd2
2 changed files with 1 additions and 25 deletions
|
@ -19,13 +19,3 @@ app.config_from_object("django.conf:settings", namespace="CELERY")
|
|||
|
||||
# Load task modules from all registered Django app configs.
|
||||
app.autodiscover_tasks()
|
||||
app.autodiscover_tasks(["bookwyrm"], related_name="activitypub.base_activity")
|
||||
app.autodiscover_tasks(["bookwyrm"], related_name="activitystreams")
|
||||
app.autodiscover_tasks(["bookwyrm"], related_name="broadcast")
|
||||
app.autodiscover_tasks(["bookwyrm"], related_name="connectors.abstract_connector")
|
||||
app.autodiscover_tasks(["bookwyrm"], related_name="emailing")
|
||||
app.autodiscover_tasks(["bookwyrm"], related_name="goodreads_import")
|
||||
app.autodiscover_tasks(["bookwyrm"], related_name="preview_images")
|
||||
app.autodiscover_tasks(["bookwyrm"], related_name="models.user")
|
||||
app.autodiscover_tasks(["bookwyrm"], related_name="suggested_users")
|
||||
app.autodiscover_tasks(["bookwyrm"], related_name="views.inbox")
|
||||
|
|
|
@ -10,21 +10,7 @@ CELERY_RESULT_BACKEND = "redis://:{}@redis_broker:{}/0".format(
|
|||
requests.utils.quote(env("REDIS_BROKER_PASSWORD", "")), env("REDIS_BROKER_PORT")
|
||||
)
|
||||
|
||||
CELERY_TASK_ROUTES = ([
|
||||
# high - should really happen ASAP
|
||||
("bookwyrm.emailing.*", {"queue": "high_priority"}),
|
||||
# medium - should really happen
|
||||
("bookwyrm.activitypub.base_activity.*", {"queue": "medium_priority"}),
|
||||
("bookwyrm.views.inbox.*", {"queue": "medium_priority"}),
|
||||
("bookwyrm.broadcast.*", {"queue": "medium_priority"}),
|
||||
("bookwyrm.activitystreams.*", {"queue": "medium_priority"}),
|
||||
# low - no rush
|
||||
("bookwyrm.connectors.abstract_connector.*", {"queue": "low_priority"}),
|
||||
("bookwyrm.goodreads_import.*", {"queue": "low_priority"}),
|
||||
("bookwyrm.models.user.*", {"queue": "low_priority"}),
|
||||
("bookwyrm.suggested_users.*", {"queue": "low_priority"}),
|
||||
("bookwyrm.preview_images.*", {"queue": "low_priority"}),
|
||||
])
|
||||
CELERY_DEFAULT_QUEUE="low_priority"
|
||||
|
||||
CELERY_ACCEPT_CONTENT = ["json"]
|
||||
CELERY_TASK_SERIALIZER = "json"
|
||||
|
|
Loading…
Reference in a new issue