Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert changes which introduced celery-based elasticsearch signal processing #1994

Merged
merged 1 commit into from
May 17, 2024

Conversation

currycoder
Copy link
Contributor

This reverts commit b94e330, reversing changes made to 111fd8c.

Aim

It turns out there are a few problems with django-elasticsearch-dsl's celery signal processing.

  1. https://sentry.ci.uktrade.digital/organizations/dit/issues/120926/?environment=uat&project=152&query=is%3Aunresolved - this is a bug in the library that could be fixed by this open PR; fix CelerySignalProcessor delete handling django-es/django-elasticsearch-dsl#473

  2. https://sentry.ci.uktrade.digital/organizations/dit/issues/120927/?environment=uat&project=152&query=is%3Aunresolved
    From debugging locally, it seems the following is happening:
    CaseAssignment model gets saved in the web process by assigning a new caseworker. The django post_save signal fires which queues a celery task. Celery task looks up the newly created CaseAssignment record and can't find it. This is because post_save is fired before the DB transaction is committed and so the totally separate celery process won't be able to see the new record until the transaction is done.

…sment-endpoint"

This reverts commit b94e330, reversing
changes made to 111fd8c.
@currycoder currycoder merged commit ad396c2 into dev May 17, 2024
16 checks passed
@delete-merged-branch delete-merged-branch bot deleted the LTD-4939-revert-optimise-assessment-endpoint branch May 17, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants