Sha256: 787cf3dc4ecab6e073612f2efa68705553be9023f0c6abf51089c80b1fd73c5f

Contents?: true

Size: 597 Bytes

Versions: 11

Compression:

Stored size: 597 Bytes

Contents

# frozen_string_literal: true

module PgEventstore
  module SubscriptionRunnerCommands
    # @!visibility private
    class Restore < Base
      # @param subscription_runner [PgEventstore::SubscriptionRunner]
      # @return [void]
      def exec_cmd(subscription_runner)
        subscription_runner.within_state(:dead) do
          subscription_runner.subscription.update(
            restart_count: 0,
            last_restarted_at: nil,
            last_error: nil,
            last_error_occurred_at: nil
          )
        end
        subscription_runner.restore
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pg_eventstore-1.9.0 lib/pg_eventstore/subscriptions/subscription_runner_commands/restore.rb
pg_eventstore-1.8.0 lib/pg_eventstore/subscriptions/subscription_runner_commands/restore.rb
pg_eventstore-1.7.0 lib/pg_eventstore/subscriptions/subscription_runner_commands/restore.rb
pg_eventstore-1.6.0 lib/pg_eventstore/subscriptions/subscription_runner_commands/restore.rb
pg_eventstore-1.5.0 lib/pg_eventstore/subscriptions/subscription_runner_commands/restore.rb
pg_eventstore-1.4.0 lib/pg_eventstore/subscriptions/subscription_runner_commands/restore.rb
pg_eventstore-1.3.4 lib/pg_eventstore/subscriptions/subscription_runner_commands/restore.rb
pg_eventstore-1.3.3 lib/pg_eventstore/subscriptions/subscription_runner_commands/restore.rb
pg_eventstore-1.3.2 lib/pg_eventstore/subscriptions/subscription_runner_commands/restore.rb
pg_eventstore-1.3.1 lib/pg_eventstore/subscriptions/subscription_runner_commands/restore.rb
pg_eventstore-1.3.0 lib/pg_eventstore/subscriptions/subscription_runner_commands/restore.rb