Module: Elasticsearch::API::Tasks::Actions
- Included in:
- TasksClient
- Defined in:
- lib/elasticsearch/api/namespace/tasks.rb,
lib/elasticsearch/api/actions/tasks/list.rb,
lib/elasticsearch/api/actions/tasks/cancel.rb
Instance Method Summary collapse
-
#cancel(arguments = {}) ⇒ Object
Cancel a specific task.
-
#list(arguments = {}) ⇒ Object
Return the list of tasks.
Instance Method Details
#cancel(arguments = {}) ⇒ Object
Cancel a specific task
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/elasticsearch/api/actions/tasks/cancel.rb', line 20 def cancel(arguments={}) valid_params = [ :node_id, :actions, :parent_node, :parent_task ] task_id = arguments.delete(:task_id) method = 'POST' path = "_tasks" path = Utils.__pathify( '_tasks', Utils.__escape(task_id), '_cancel' ) params = Utils.__validate_and_extract_params arguments, valid_params body = nil perform_request(method, path, params, body).body end |
#list(arguments = {}) ⇒ Object
Return the list of tasks
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/elasticsearch/api/actions/tasks/list.rb', line 24 def list(arguments={}) valid_params = [ :node_id, :actions, :detailed, :parent_node, :parent_task, :group_by, :wait_for_completion ] task_id = arguments.delete(:task_id) method = 'GET' path = "_tasks" path = Utils.__pathify( '_tasks', Utils.__escape(task_id) ) params = Utils.__validate_and_extract_params arguments, valid_params body = nil perform_request(method, path, params, body).body end |