Sha256: 71171d7bad7f824987e90fab650be25eba6cf27abe00d2c8cabfff4871a2ea36
Contents?: true
Size: 786 Bytes
Versions: 14
Compression:
Stored size: 786 Bytes
Contents
namespace :puma do namespace :workers do desc 'Add a worker' task :count do on roles (fetch(:puma_role)) do #TODO # cleanup # add host name/ip workers_count = capture("ps ax | grep -c 'puma: cluster worker: `cat #{fetch(:puma_pid)}`'").to_i - 1 log "Workers count : #{workers_count}" end end # TODO # Add/remove workers to specific host/s # Define # of workers to add/remove # Refactor desc 'Worker++' task :more do on roles (fetch(:puma_role)) do execute("kill -TTIN `cat #{fetch(:puma_pid)}`") end end desc 'Worker--' task :less do on roles (fetch(:puma_role)) do execute("kill -TTOU `cat #{fetch(:puma_pid)}`") end end end end
Version data entries
14 entries across 14 versions & 1 rubygems