lib/qpush/server/apis/fail.rb in qpush-0.1.4 vs lib/qpush/server/apis/fail.rb in qpush-0.1.6
- old
+ new
@@ -21,14 +21,14 @@
@job.retry if @job.retry_job?
@job.morgue if @job.dead_job?
end
def stat_increment
- QPush.redis.with { |c| c.hincrby(QPush.keys.stats, 'failed', 1) }
+ Server.redis { |c| c.hincrby(Server.keys.stats, 'failed', 1) }
end
def log_error
- Server.log.err("Job FAILED | #{@job.klass} | #{@job.id} | #{@error.message}")
+ Server.log.err("Worker #{Server.worker.id} | Job FAILED | #{@job.klass} | #{@job.id} | #{@error.message}")
end
def update_history
History.call(@job, false, @error)
end