Sha256: 1d28b90f0c8383428f751cd5d90dfadffd5960ae18d0d39534b7ab3edab1569e
Contents?: true
Size: 715 Bytes
Versions: 7
Compression:
Stored size: 715 Bytes
Contents
# frozen_string_literal: true module PgEventstore module SubscriptionRunnerCommands # @!visibility private class ResetPosition < Base class << self # @param data [Hash] # @return [Hash] def parse_data(data) { 'position' => Integer(data['position']) } end end # @param subscription_runner [PgEventstore::SubscriptionRunner] # @return [void] def exec_cmd(subscription_runner) subscription_runner.within_state(:stopped) do subscription_runner.clear_chunk subscription_runner.subscription.update(last_chunk_greatest_position: nil, current_position: data['position']) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems