Skip to content

Support for Multiple Workers/Threading/Scaling #2

@jamestutton

Description

@jamestutton

Firstly not tested yet just reviewing the code as found this while looking to write something similar as seems you have done some great work already.

Just wondering if this project would work with multiple workers or if it only supports single process per queue?

From what I can tell the current queue.next() call is checking the queue and locking the queue as 2 operations. As such if you have more than one "worker" process or thread then if timing is right both of them could be assigned the same job. Is this the case or have i missed something that protects against this.

If it isn't something that currently handled is it something you'd consider for a roadmap and any idea on best way to handle it.

My thoughts would be a single find and update call or some sort of uuid to flag the job owner and a cross check that it is actually the correct process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions