Class: SearchKit::Events::CLI::List

Inherits:
Object
  • Object
show all
Includes:
Messaging
Defined in:
lib/search_kit/events/cli/list.rb

Overview

An extraction of the CLI command, “pending”. When the pending comand is not given any parameters, it looks for all pending events despite of channel - or in other words, the index of events.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Messaging

#info, #warning

Constructor Details

#initialize(client) ⇒ List



15
16
17
# File 'lib/search_kit/events/cli/list.rb', line 15

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



13
14
15
# File 'lib/search_kit/events/cli/list.rb', line 13

def client
  @client
end

Instance Method Details

#performObject



19
20
21
22
23
24
25
26
# File 'lib/search_kit/events/cli/list.rb', line 19

def perform
  report_events
rescue Faraday::ConnectionFailed
  warning "Remote events service not found"
rescue JSON::ParserError => error
  warning "Response unreadable: #{error}"
  error.backtrace.each(&method(:warning))
end