Sha256: cc0c8bdef2097bbc95521a473e5201096d1bd46accbaee5f87b532072d94a645
Contents?: true
Size: 580 Bytes
Versions: 13
Compression:
Stored size: 580 Bytes
Contents
require 'vx/common/amqp' require 'vx/message' module Vx module Worker class JobsConsumer include Vx::Common::AMQP::Consumer exchange 'vx.jobs' queue 'vx.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
Version data entries
13 entries across 13 versions & 1 rubygems