mperham/sidekiq — Issue #37: Terminated workers on Heroku
Author: dolzenko
Created: 2012-02-17 09:54:16+00:00
State: open

Assuming we're processing long-running jobs (many slow API calls, etc.), and Heroku decides to shutdown the worker as described in [1] what will happen? Specifically

1. Will the exception notification be send?
2. Will the job be requeued (e.g. as Qu does it [2]) or put into failed queue?

I have made some tests and it seems like the job is just gone as it was when we were using Resque, but I can't be sure because 1) probably Airbrake setup wasn't picked up correctly 2) not really understanding the Celluloid internals to have a good idea on what should happen.

And yes, we're trying to restructure our jobs to execute faster, but it still seems like these `SIGTERM` should get 'special treatment', especially in Heroku env.

[1] http://devcenter.heroku.com/articles/ps#graceful_shutdown_with_sigterm
[2] https://github.com/bkeepers/qu/blob/master/lib/qu/payload.rb#L27
[3] https://github.com/defunkt/resque/issues/319