-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Thanks very much for this plugin - super helpful.
In the file /lib/capistrano/tasks/solid_queue.rake most of the tasks are limited to the :solid_queue_role which defaults to :db. However, the quiet task runs on the role :app.
Even though it seems to be configured to not complain on failure with raise_on_non_zero_exit: false my production deploy task fails to complete, because on the app servers that are not in the :db group return this error:
DEBUG [74797850] Command: /usr/bin/env /bin/systemctl --user kill -s SIGTERM supershop_solid_queue_production
DEBUG [c3ecd6da] Failed to kill unit supershop_solid_queue_production.service: Unit supershop_solid_queue_production.service not loaded.
I am running Amazon Linux 2023 and using rvm.
Everything works fine for me if I change :app to fetch(:solid_queue_role) in this part of the code linked below. Is there a reason that this runs on all servers instead of just the :db role, or is this just a bug?
capistrano-solid_queue/lib/capistrano/tasks/solid_queue.rake
Lines 61 to 66 in 6e1801d
| desc "Quiet solid_queue (start graceful termination)" | |
| task :quiet do | |
| on roles(:app) do | |
| plugin.execute_systemd("kill", "-s", "SIGTERM", fetch(:solid_queue_service_unit_name), raise_on_non_zero_exit: false) | |
| end | |
| end |