Sha256: c89d6341014a8ee7f7f45caddb0dd22790eb225f97ff9f56f6e17f34d93a0c78

Contents?: true

Size: 570 Bytes

Versions: 1

Compression:

Stored size: 570 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
evrone-ci-router-0.2.0.pre0 lib/evrone/ci/router/consumers/builds_consumer.rb