Vote count: 0
I have a pm2 task to get the status, which require now a -s parameter to be passed over, how can I pass it in
ps = JSON.parse(capture :pm2, :jlist, fetch(:app_command))
here is my complete task :
require 'json'
namespace :pm2 do
def app_status
within current_path do
ps = JSON.parse(capture :pm2, :jlist, fetch(:app_command))
if ps.empty?
return nil
else
# status: online, errored, stopped
return ps[0]["pm2_env"]["status"]
end
end
end
end
asked 44 secs ago
Capistrano 3 Task : how to pass a parameter
Aucun commentaire:
Enregistrer un commentaire