Sha256: 377843970e6ac5b1cc5a93c82908005416211dff143fe8437a2e1b249ecd967e

Contents?: true

Size: 526 Bytes

Versions: 5

Compression:

Stored size: 526 Bytes

Contents

require 'avro'

Settings.define :cassandra_avro_schema, :default => ('/usr/local/share/cassandra/interface/avro/cassandra.avpr')

module Wukong::Store::Cassandra
  class StructLoader < Wukong::Streamer::StructStreamer
    def initialize *args
      super(*args)
      @log = PeriodicMonitor.new
    end

    #
    # Blindly expects objects streaming by to have a "streaming_save" method
    #
    def process object, *_
      # object.save
      object.streaming_save
      @log.periodically(object.to_flat)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wukong-3.0.0.pre old/wukong/store/cassandra/struct_loader.rb
wukong-2.0.2 lib/wukong/store/cassandra/struct_loader.rb
wukong-2.0.1 lib/wukong/store/cassandra/struct_loader.rb
wukong-2.0.0 lib/wukong/store/cassandra/struct_loader.rb
wukong-1.5.4 lib/wukong/store/cassandra/struct_loader.rb