Sha256: 7054599cfc1a096da14741421663ccbceaf7f195ecae8ce955164e63d8cc457c
Contents?: true
Size: 789 Bytes
Versions: 2
Compression:
Stored size: 789 Bytes
Contents
require "alephant/logger" require "alephant/broker/component" module Alephant module Broker module Request class Batch include Logger attr_reader :batch_id, :components, :load_strategy def initialize(component_factory, env) logger.info "Request::Batch#initialize: id: #{env.data['batch_id']}" @batch_id = env.data["batch_id"] @component_factory = component_factory @components = components_for env end private def components_for(env) env.data["components"].map do |c| @component_factory.create( c["component"], batch_id, c["options"] ) end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
alephant-broker-3.10.1 | lib/alephant/broker/request/batch.rb |
alephant-broker-3.10.0 | lib/alephant/broker/request/batch.rb |