Sha256: a7e68961087b80536725441ae6ca6164fc49cf3745dfbf3b1f507fa484fcdd10

Contents?: true

Size: 435 Bytes

Versions: 1

Compression:

Stored size: 435 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
          QPush.redis.with { |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.4 lib/qpush/web/apis/jobs.rb