Skip to content

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

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

Open
jeygeethan-rocketapex opened this issue May 28, 2025 · 2 comments

Comments

@jeygeethan-rocketapex
Copy link

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

@joshleblanc
Copy link

There's a PR for this I think #523

@rosa
Copy link
Member

rosa commented Jun 16, 2025

Yes, @joshleblanc! That'd be exactly the feature in that PR.

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

No branches or pull requests

3 participants