lib/workless/scalers/base.rb in workless_revived-1.2.5 vs lib/workless/scalers/base.rb in workless_revived-2.0.0
- old
+ new
@@ -3,20 +3,16 @@
module Delayed
module Workless
module Scaler
class Base
def self.jobs
- if Rails.version >= '3.0.0'
- Delayed::Job.where(failed_at: nil)
- else
- Delayed::Job.all(conditions: { failed_at: nil })
- end
+ Delayed::Job.where(failed_at: nil)
end
end
module HerokuClient
def client
- @client ||= ::Heroku::API.new(api_key: ENV['HEROKU_API_KEY'])
+ @client ||= ::PlatformAPI.connect(ENV['HEROKU_API_KEY'])
end
end
end
end
end