lib/qpush/server/apis/perform.rb in qpush-0.1.4 vs lib/qpush/server/apis/perform.rb in qpush-0.1.6

- old
+ new

@@ -1,22 +1,18 @@ module QPush module Server module Apis class Perform < Base - def initialize(job) - @job = job - end - def call perform_job end private def perform_job - QPush.redis.with do |conn| - conn.hincrby(QPush.keys.stats, 'performed', 1) - conn.lpush("#{QPush.keys.perform}:#{@job.priority}", @job.to_json) + Server.redis do |conn| + conn.hincrby(Server.keys.stats, 'performed', 1) + conn.lpush("#{Server.keys.perform}:#{@job.priority}", @job.to_json) end end end end end