Fix SOLID_QUEUE_SKIP_RECURRING
env variable not doing anything
#608
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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, theoptions
that are passed toSolidQueue::Supervisor.start
already containskip_recurring: false
. The default options fromConfiguration
don't override this.To me, the best solution seems to be to remove the
default: false
, since the actual defaults are applied byConfiguration
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)