summaryrefslogtreecommitdiff
path: root/app/controllers/unicorn_test_controller.rb
blob: b7a1a046be0b785d7ec7b9b4cb0b1897ed381acd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
if Rails.env.test?
  class UnicornTestController < ActionController::Base
    def pid
      render plain: Process.pid.to_s
    end
  
    def kill
      Process.kill(params[:signal], Process.pid)
      render plain: 'Bye!'
    end
  end
end