Skip to content

How to check if a solid-queue job is already pending with arguments? #571

Open
@jeygeethan-rocketapex

Description

@jeygeethan-rocketapex

I have an event that enqueues a job with arguments into the queue. This job is limited by concurrency. It can run only once at any given time for the given set of arguments. It gets blocked and then it gets executed again.

I want to not even enqueue the second time. For this, I have to check if the job is already in progress, or in queue, or blocked. How can I check with exact arguments?

I tried

SolidQueue::Job.scheduled.where(class_name: 'SomeJob') but this doesn't get with the arguments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions