Skip to content

Commit 3c7a173

Browse files
authored
🔧 chore: mention that tasks must be added to TASKWORKER_IMPORTS (#14308)
1 parent 6cd4e7d commit 3c7a173

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

develop-docs/backend/application-domains/asynchronous-workers.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,15 @@ There are a few important points:
6868
large messages, large queues and more (de)serialising overheads so
6969
should be avoided.
7070

71-
- The tasks' module _must_ be added to `CELERY_IMPORTS`.
71+
- The tasks' module _must_ be added to `CELERY_IMPORTS` _and_ `TASKWORKER_IMPORTS`.
7272

73-
Celery workers must find the task by name, they can only do so if
73+
Celery (and Taskbroker) workers must find the task by name, they can only do so if
7474
the worker has imported the module with the decorated task function
7575
because this is what registers the task by name. Thus every module
76-
containing a task must be added to the `CELERY_IMPORTS` setting in
76+
containing a task must be added to the `CELERY_IMPORTS` and `TASKWORKER_IMPORTS` settings in
7777
`src/sentry/conf/server.py`.
78+
79+
We have a separate setting for the Taskbroker workers until we fully deprecate the Celery workers.
7880

7981
## Running a Worker
8082

0 commit comments

Comments
 (0)