rails / solid_queue

Database-backed Active Job backend
MIT License
1.96k stars 131 forks source link

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

Closed toydestroyer closed 2 months ago

toydestroyer commented 2 months ago

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 commented 2 months ago

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