Class: EventStoreClient::GRPC::Commands::PersistentSubscriptions::Delete

Inherits:
Command
  • Object
show all
Defined in:
lib/event_store_client/adapters/grpc/commands/persistent_subscriptions/delete.rb

Instance Method Summary collapse

Methods inherited from Command

inherited, #metadata

Methods included from Configuration

#config

Instance Method Details

#call(stream, group) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/event_store_client/adapters/grpc/commands/persistent_subscriptions/delete.rb', line 17

def call(stream, group)
  opts =
    {
      stream_identifier: {
        streamName: stream
      },
      group_name: group
    }
  service.delete(request.new(options: opts), metadata: )
  Success()
rescue ::GRPC::NotFound
  Failure(:not_found)
end