Module: CDC::SolidQueue::CLI

Defined in:
lib/cdc/solid_queue/cli.rb

Overview

Command helpers used by Rails tasks and executable entrypoints.

Class Method Summary collapse

Class Method Details

.startInteger

Start PostgreSQL CDC ingestion using the global configuration.

Returns:

  • (Integer)

    number of enqueued events when the stream exits



11
12
13
14
15
16
17
# File 'lib/cdc/solid_queue/cli.rb', line 11

def start
  configuration = CDC::SolidQueue.configuration
  enqueuer = CDC::SolidQueue::Enqueuer.new(configuration)
  stream = CDC::SolidQueue::PostgresqlStream.new(configuration)

  CDC::SolidQueue::Runner.new(stream:, enqueuer:).start
end