Skip to content

Commit

Permalink
Don't disconnect when running tasks inline
Browse files Browse the repository at this point in the history
This fixes issues in production and testing environments.
  • Loading branch information
Amiel Martin committed Mar 22, 2013
1 parent 15a03df commit a839554
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/resque/plugins/heroku.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ module Resque
module Plugins
module Heroku
def after_perform_heroku(*args)
ActiveRecord::Base.connection.disconnect!
ActiveRecord::Base.connection.disconnect! unless Resque.inline?
end

def on_failure_heroku(e, *args)
ActiveRecord::Base.connection.disconnect!
ActiveRecord::Base.connection.disconnect! unless Resque.inline?
end
end
end
Expand Down

0 comments on commit a839554

Please sign in to comment.