Sha256: 2bec650b158c1e0a3605976da006c022b1136c3a6abb06c443ee172935ea42e7

Contents?: true

Size: 484 Bytes

Versions: 2

Compression:

Stored size: 484 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

2 entries across 2 versions & 1 rubygems

Version Path
workless_revived-1.2.4.2 lib/workless/scalers/base.rb
workless_revived-1.2.4 lib/workless/scalers/base.rb