Sha256: d3704ef5b15f6307b1095ba3f4b5aacabf1148bcfabad20164605f4bd16be21e

Contents?: true

Size: 428 Bytes

Versions: 1

Compression:

Stored size: 428 Bytes

Contents

module QPush
  module Web
    module Apis
      class Jobs
        def initialize
          @jobs = nil
        end

        def call
          retrieve_jobs
          update_jobs
        end

        private

        def retrieve_jobs
          Web.redis { |c| @jobs = c.smembers("#{QPush.keys.jobs}") }
        end

        def update_jobs
          @jobs.map! { |job| { klass: job } }
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
qpush-0.1.6 lib/qpush/web/apis/jobs.rb