Singlethread Services Worker

This commit is contained in:
Ariel Rin
2025-07-07 03:52:08 +00:00
parent ed4157fd0c
commit 3e89ae20d7
4 changed files with 39 additions and 6 deletions

View File

@@ -35,6 +35,13 @@ app.conf.ONCE = {
'settings': {}
}
app.conf.task_routes = {
# Some AA Services are sensitive to threaded tasks
# Utilize a single threaded worker to process these tasks
# Discord: Multithreads can cause duplicate role creation.
"discord.*": {"queue": "services"},
}
# Load task modules from all registered Django app configs.
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)