Sha256: e5550f13adb42e35d6527f35848af39d17691b3fa9ef241f1d2f4c9e721c6486
Contents?: true
Size: 625 Bytes
Versions: 2
Compression:
Stored size: 625 Bytes
Contents
require 'evrone/common/amqp' module Evrone module CI module Worker class JobsConsumer include Evrone::Common::AMQP::Consumer exchange 'ci.jobs' queue 'ci.worker.jobs' ack true model Message::PerformJob def perform(message) 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 end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
evrone-ci-worker-0.2.0.pre8 | lib/evrone/ci/worker/consumers/jobs_consumer.rb |
evrone-ci-worker-0.2.0.pre7 | lib/evrone/ci/worker/consumers/jobs_consumer.rb |