Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only instantiate one celery app per process.
Ticket: BOM-2086 Currently there are parts of the LMS that import content from the CMS APP and vice-versa. When this happens, we end up with 2 instances of the celery app and some tasks get registered to the wrong one. The tasks that were getting registered to the wrong one are never able to run and result in lots of production errors on celery workers. The timing of the CMS celery app instantiation is non deterministic so different tasks get lost depending on when it's imported by some code in the LMS. As long as SERVICE_VARIANT is set, this code should prevent the instantiation of both celery apps.
- Loading branch information