require 'evrone/common/amqp' module Evrone module CI class Router class BuildsConsumer include Evrone::Common::AMQP::Consumer exchange 'ci.builds' queue 'ci.worker.builds.generic' ack true model Message::PerformBuild def perform(message) build = Build.new message number = Thread.current[:consumer_id] || 0 path_prefix = "/tmp/.test/build.#{number}" Router.new(build, path_prefix).perform ack! end end end end end