Class: SearchKit::Events::CLI::Status
- Inherits:
-
Object
- Object
- SearchKit::Events::CLI::Status
- Includes:
- Messaging
- Defined in:
- lib/search_kit/events/cli/status.rb
Overview
An extraction of the CLI command, “all”.
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(client, id) ⇒ Status
constructor
A new instance of Status.
- #perform ⇒ Object
Methods included from Messaging
Constructor Details
#initialize(client, id) ⇒ Status
Returns a new instance of Status.
13 14 15 16 |
# File 'lib/search_kit/events/cli/status.rb', line 13 def initialize(client, id) @client = client @id = id end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
11 12 13 |
# File 'lib/search_kit/events/cli/status.rb', line 11 def client @client end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
11 12 13 |
# File 'lib/search_kit/events/cli/status.rb', line 11 def id @id end |
Instance Method Details
#perform ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/search_kit/events/cli/status.rb', line 18 def perform info "Event #{id} status: #{status}" rescue Errors::EventNotFound warning "No event found for #{id}" rescue Faraday::ConnectionFailed warning "Remote events service not found" rescue JSON::ParserError => error warning "Response unreadable: #{error}" error.backtrace.each(&method(:warning)) end |