Class: JayAPI::Elasticsearch::Tasks
- Inherits:
-
Object
- Object
- JayAPI::Elasticsearch::Tasks
- Defined in:
- lib/jay_api/elasticsearch/tasks.rb
Overview
Represents Elasticsearch tasks. Returns information about the tasks currently executing in the cluster. TODO: Add #all [JAY-593]
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#by_id(task_id) ⇒ Hash
Retrieves info about the task with the passed
task_id
For more information on how to build the query please refer to the Elasticsearch DSL documentation: www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html#tasks-api-query-params. -
#initialize(client:) ⇒ Tasks
constructor
A new instance of Tasks.
Constructor Details
#initialize(client:) ⇒ Tasks
Returns a new instance of Tasks.
16 17 18 |
# File 'lib/jay_api/elasticsearch/tasks.rb', line 16 def initialize(client:) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
12 13 14 |
# File 'lib/jay_api/elasticsearch/tasks.rb', line 12 def client @client end |
Instance Method Details
#by_id(task_id) ⇒ Hash
Retrieves info about the task with the passed task_id
For more information on how to build the query please refer to the Elasticsearch DSL documentation: www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html#tasks-api-query-params
31 32 33 |
# File 'lib/jay_api/elasticsearch/tasks.rb', line 31 def by_id(task_id) client.task_by_id(task_id: task_id, wait_for_completion: true).deep_symbolize_keys end |