lib/alephant/broker/load_strategy/s3.rb in alephant-broker-3.0.0 vs lib/alephant/broker/load_strategy/s3.rb in alephant-broker-3.0.1

- old
+ new

@@ -19,11 +19,11 @@ ), component_meta ) end - private + private def add_s3_headers(component_data, component_meta) component_data.merge( { headers: headers(component_meta) } ) @@ -36,11 +36,11 @@ def headers(component_meta) { 'X-Sequence' => sequence(component_meta).to_s } end def sequence(component_meta) - sequencer(component_meta).get_last_seen + sequencer.get_last_seen component_meta.key end def retrieve_object(component_meta) component_meta.cached = false s3.get s3_path(component_meta) @@ -75,12 +75,12 @@ @lookup ||= Alephant::Lookup.create( Broker.config[:lookup_table_name] ) end - def sequencer(component_meta) - Alephant::Sequencer.create( - Broker.config[:sequencer_table_name], component_meta.key + def sequencer + @sequencer ||= Alephant::Sequencer.create( + Broker.config[:sequencer_table_name], nil ) end end end end