Skip to content

Implement locking for tasks to prevent race conditions #89

@sjmf

Description

@sjmf

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions