Hey Core Team-
I recently was upgrading my app from 7.1 to Rails 8.0.0-beta1, and when I was reviewing the suggested changes to my production.rb file, I noticed that it was suggesting I change away from SolidQueue and replace it with:
# Replace the default in-process and non-durable queuing backend for Active Job.
# config.active_job.queue_adapter = :resque
I went and checked production.rb.tt on main and confirmed that it’s still suggesting resque.
I thought this might be an easy contribution to make- it’s been almost 18 years since my last contribution, so heck, why not get back into it?
However, there are some complications to the best way to solve this that I’d love to get the core team’s opinion on the best way to solve.
The solid_queue:install job automatically replaces the :resque suggestion on install. So, new rails apps generate the production.rb file talking about resque, but then in the post-generation step of running solid_queue install, it replaces the one pre-existing line with TWO lines (to include the new database configuration line)
Relevant SolidQueue code here: solid_queue/lib/generators/solid_queue/install/install_generator.rb at main · rails/solid_queue · GitHub
So, if I change production.rb.tt to generate commented-out solid_queue suggested adapter (two lines), then the post-install step runs, there will be THREE total lines because SolidQueue install step is injecting a second new line.
Make sense? See what I mean by complicated?
So, there stands the question of what to do with production.rb.tt. The generated code only is included if active_job is included, and I believe active_job will now always install solid_queue… so, should we just remove the additional install logic from solid_queue and have production.rb always include uncommented-out configuration lines? Or should solid_queue install step be the only way to inject those configurations?
Makes my head spin!
I’d love some thoughts on the best way to get :resque out of the picture… because I do think it’s still a worthwhile thing to replace- no sense in trying to recommend something we don’t recommend anymore in any of the code!
Thanks for your help!
-hampton.
PS: I have a PR open Use Solid Queue in the production environment configuration by HamptonMakes · Pull Request #53143 · rails/rails · GitHub with a commented-out version of including the newly suggested code.