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

Implement locking for tasks to prevent race conditions #89

Open
sjmf opened this issue Oct 5, 2022 · 0 comments
Open

Implement locking for tasks to prevent race conditions #89

sjmf opened this issue Oct 5, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@sjmf
Copy link
Member

sjmf commented Oct 5, 2022

Problem:

Multiple instances of the same task can be served to celery. For example, loadParameters is a long running task. If it is kicked off in the interface multiple times, or scheduled too closely together, another task should not start to run while the existing one is running.

Solution:
A locking mechanism will need to be implemented in the application to stop tasks from colliding in this way. For example, http://loose-bits.com/2010/10/distributed-task-locking-in-celery.html and https://docs.celeryq.dev/en/latest/tutorials/task-cookbook.html#ensuring-a-task-is-only-executed-one-at-a-time

@sjmf sjmf added the enhancement New feature or request label Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant