Sha256: fa39998c8743e687eda26c06a991dd1c5ffbcf0a32205b806bf9510cd450ea4d

Contents?: true

Size: 805 Bytes

Versions: 12

Compression:

Stored size: 805 Bytes

Contents

if File.exists? Rails.root.join('config/puma.rb')
  namespace :puma do
    desc 'Start puma server'
    task :start => :stop do
      cmd = 'puma -C config/puma.rb -e production'
      zfben_rails_rake_system 'mkdir tmp' unless File.exists? Rails.root.join('tmp')
      zfben_rails_rake_system cmd
    end

    desc 'Stop puma server'
    task :stop do
      if File.exists? Rails.root.join('tmp/puma.pid')
        zfben_rails_rake_system 'kill -QUIT `cat tmp/puma.pid`'
        sleep 1
        zfben_rails_rake_system 'rm tmp/puma.pid' if File.exists? Rails.root.join('tmp/puma.pid')
      end
    end

    desc 'Hot restart puma server'
    task :restart do
      if File.exists? Rails.root.join('tmp/puma.pid')
        zfben_rails_rake_system 'kill -USR2 `cat tmp/puma.pid`'
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
h2ocube_rails_tasks-0.0.14 lib/h2ocube_rails_tasks/tasks/puma.rb
h2ocube_rails_tasks-0.0.13 lib/h2ocube_rails_tasks/tasks/puma.rb
h2ocube_rails_tasks-0.0.12 lib/h2ocube_rails_tasks/tasks/puma.rb
h2ocube_rails_tasks-0.0.11 lib/h2ocube_rails_tasks/tasks/puma.rb
h2ocube_rails_tasks-0.0.10 lib/h2ocube_rails_tasks/tasks/puma.rb
h2ocube_rails_tasks-0.0.9 lib/h2ocube_rails_tasks/tasks/puma.rb
h2ocube_rails_tasks-0.0.8 lib/h2ocube_rails_tasks/tasks/puma.rb
h2ocube_rails_tasks-0.0.7 lib/h2ocube_rails_tasks/tasks/puma.rb
h2ocube_rails_tasks-0.0.6 lib/h2ocube_rails_tasks/tasks/puma.rb
h2ocube_rails_tasks-0.0.5 lib/h2ocube_rails_tasks/tasks/puma.rb
h2ocube_rails_tasks-0.0.4 lib/h2ocube_rails_tasks/tasks/puma.rb
h2ocube_rails_tasks-0.0.3 lib/h2ocube_rails_tasks/tasks/puma.rb