lib/evrone/ci/worker/consumers/jobs_consumer.rb in evrone-ci-worker-0.2.0.pre6 vs lib/evrone/ci/worker/consumers/jobs_consumer.rb in evrone-ci-worker-0.2.0.pre7

- old
+ new

@@ -6,20 +6,22 @@ class JobsConsumer include Evrone::Common::AMQP::Consumer exchange 'ci.jobs' - queue 'ci.worker.jobs.generic' + queue 'ci.worker.jobs' ack true model Message::PerformJob def perform(message) - job = Job.new message - number = Thread.current[:consumer_id] || 0 - path_prefix = "/tmp/.test/job.#{number}" - Worker.perform(job, path_prefix) - ack! + Worker.logger.tagged self.class.consumer_id do + job = Job.new message + number = Thread.current[:consumer_id] || 0 + path_prefix = "/tmp/.test/job.#{number}" + Worker.perform(job, path_prefix) + ack! + end end end end end