Sha256: 25bcd0e0fea7f8c840849ce17fdb05f36b3f74b86323a0b5172c0bc6b23a56f0
Contents?: true
Size: 1.09 KB
Versions: 11
Compression:
Stored size: 1.09 KB
Contents
require "alephant/broker/load_strategy/s3/base" module Alephant module Broker module LoadStrategy module S3 class Sequenced < Base def sequence(component_meta) sequencer.get_last_seen component_meta.key end def s3_path(component_meta) lookup.read( component_meta.id, component_meta.options, sequence(component_meta) ).tap do |obj| raise InvalidCacheKey if obj.location.nil? end.location unless sequence(component_meta).nil? end def sequencer @sequencer ||= Alephant::Sequencer.create( Broker.config[:sequencer_table_name], :config => Broker.config ) end def storage_key(component_meta) "#{super(component_meta)}/#{sequence(component_meta)}" end def headers(component_meta) { "X-Sequence" => sequence(component_meta).to_s }.merge(super(component_meta)) end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems