Skip to content

Commit

Permalink
Upgrade Unicorn
Browse files Browse the repository at this point in the history
In this change I'm upgrading unicorn in order to get the call back
`after_worker_exit`. I need this in development to kill ghost workers
that are pilling up on my computer every time I restart the app.
  • Loading branch information
gabrielpoca committed Mar 30, 2018
1 parent 2bfc7f3 commit d73a7d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/unicorn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
ActiveRecord::Base.establish_connection(config)
end
end

after_worker_exit do |_server, _worker, _status|
Process.kill("QUIT", @delayed_job_pid) if !ENV["RACK_ENV"] || ENV["RACK_ENV"] == "development"
end

0 comments on commit d73a7d7

Please sign in to comment.