Skip to content
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

Update Thor CLI options to respect ENV variables for default values #345

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

toydestroyer
Copy link
Contributor

With the introduction of bin/jobs in #308, I noticed that it ignores the SOLID_QUEUE_CONFIG environment variable (and the recently introduced SOLID_QUEUE_RECURRING_SCHEDULE), while rails solid_queue:start still respects both of them.

This PR is my attempt to fix it.

Please let me know if it is worth adding tests for the SolidQueue::Cli.

Also, I hope that the direction is correct, although the logic duplicates default_options from SolidQueue::Configuration.

@rosa
Copy link
Member

rosa commented Sep 15, 2024

Oops, thank you! I had broken this, then fixed it, then broken it again 🤦🏻‍♀️

lib/solid_queue/cli.rb Outdated Show resolved Hide resolved
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.

Nice! Thank you so much! 🙏

@rosa rosa merged commit e67a9d7 into rails:main Sep 16, 2024
4 checks passed
@toydestroyer toydestroyer deleted the cli-env-variables branch September 16, 2024 13:59
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