lib/qpush/server/apis/morgue.rb in qpush-0.1.4 vs lib/qpush/server/apis/morgue.rb in qpush-0.1.6
- old
+ new
@@ -1,22 +1,18 @@
module QPush
module Server
module Apis
class Morgue < Base
- def initialize(job)
- @job = job
- end
-
def call
send_to_morgue
end
private
def send_to_morgue
- QPush.redis.with do |conn|
- conn.hincrby(QPush.keys.stats, 'dead', 1)
- conn.lpush(QPush.keys.morgue, @job.to_json)
+ Server.redis do |conn|
+ conn.hincrby(Server.keys.stats, 'dead', 1)
+ conn.lpush(Server.keys.morgue, @job.to_json)
end
end
end
end
end