While implementing puma
, I have updated ubuntu version from 14.04 to 16.04.
Prior service was based on upstart, basically workers
and sidekiq
started with upstart. However, the problem occurs when I try to deploy actual code.
During the deployment, prior code checked status of workers via code like below.
if capture('status workers') =~ /start/
I have not installed upstart
in ubuntu 16.04 thereby deploy failed at this point. Is there anyway that I can substitute such command driven from upstart
in ubuntu 16.04?
Also Kernel.capture
which is shown above is also deprecated code. Is there any substitutions for these, please let me know.
You should use systemd
utils in Ubuntu 16.04:
sudo systemctl status puma.socket puma.service
for Puma - see the Puma systemd page
sudo systemctl status sidekiq
for Sidekiq - see Sidekiq's systemd service file
Instead of using Kernel.capture, use Ruby Open3 methods - there's a good article on them.