Skip to content

Fix SOLID_QUEUE_SKIP_RECURRING env variable not doing anything #608

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

Merged
merged 1 commit into from
Jul 23, 2025

Conversation

danieldiekmeier
Copy link
Contributor

Hello! Thank you for all your work on Solid Queue!

Recently, in v1.2.0, you introduced a support for SOLID_QUEUE_SKIP_RECURRING as an alternative to --skip-recurring. This is really helpful for us with our Heroku setup, so many thanks!

However, when we upgraded to v1.2.0, we noticed that it doesn't actually skip the recurring jobs. I dug into the code and I think the problem is that without the --skip-recurring flag, the options that are passed to SolidQueue::Supervisor.start already contain skip_recurring: false. The default options from Configuration don't override this.

To me, the best solution seems to be to remove the default: false, since the actual defaults are applied by Configuration anyway.

I hope you agree and that this can be included soon! Until then, we're patching this in bin/jobs:

  require_relative "../config/environment"
  require "solid_queue/cli"

+ ARGV << "--skip-recurring" if ENV["SOLID_QUEUE_SKIP_RECURRING"]

  SolidQueue::Cli.start(ARGV)

Copy link
Member

@rosa rosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, d'oh! Of course, you're totally right! Thanks a lot @danieldiekmeier, the fix seems simple and good to me!

@rosa rosa merged commit f4bcf70 into rails:main Jul 23, 2025
85 of 86 checks passed
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

Successfully merging this pull request may close these issues.

2 participants