class DbBlaster::BasePublisher

Base class for publishing

Attributes

batch_start_time[R]
records[R]
source_table[R]

Public Class Methods

new(source_table, records, batch_start_time) click to toggle source
# File lib/db_blaster/base_publisher.rb, line 9
def initialize(source_table, records, batch_start_time)
  @source_table = source_table
  @records = records
  @batch_start_time = batch_start_time
end
publish(source_table:, records:, batch_start_time:) click to toggle source
# File lib/db_blaster/base_publisher.rb, line 15
def self.publish(source_table:, records:, batch_start_time:)
  publisher_class =
    if DbBlaster.configuration.sns_topic
      SnsPublisher
    else
      S3Publisher
    end
  publisher_class.new(source_table, records, batch_start_time).publish
end

Public Instance Methods

publish() click to toggle source
# File lib/db_blaster/base_publisher.rb, line 25
def publish
  raise NotImplementedError
end