Remove unused code from celery

This commit is contained in:
Mouse Reeve 2021-09-07 16:33:18 -07:00
parent c0b662cbd7
commit 7b2e4eebd2
2 changed files with 1 additions and 25 deletions

View file

@ -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")

View file

@ -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"