Sha256: b89ec8cca5bb85ad5c8a5b5be4bc65eb974d99ff9d6575fd1ded39a5d550599e

Contents?: true

Size: 468 Bytes

Versions: 1

Compression:

Stored size: 468 Bytes

Contents

require 'delayed_job'

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
        end
      end

      module HerokuClient
        def client
          @client ||= ::Heroku::API.new(api_key: ENV['HEROKU_API_KEY'])
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
workless_revived-1.2.5 lib/workless/scalers/base.rb