JustinLove / autoscaler

Start/stop Sidekiq workers on Heroku
226 stars 42 forks source link

undefined method `async' for nil:NilClass #37

Closed vovayartsev closed 10 years ago

vovayartsev commented 10 years ago

I tried Autoscaler version from GitHub dated April 30, 2014 on Heroku, and got this error in monitor_middleware_adapter.rb:28

http://monosnap.com/image/vqen1rkauAMy4ndpCpqRG25eAOvKaZ

vovayartsev commented 10 years ago

This issue happens when a long-running task in Sidekiq is being terminated with SIGTERM (which happens often when scaling down on Heroku using Linear strategy).

Here's a simple fix which worked for me.

bkudria commented 10 years ago

Thanks for this fix. If you make a PR, I'll merge it.