Method: Elasticsearch::API::Cluster::Actions#pending_tasks

Defined in:
lib/elasticsearch/api/actions/cluster/pending_tasks.rb

#pending_tasks(arguments = {}) ⇒ Object

Returns a list of any cluster-level changes (e.g. create index, update mapping, allocate or fail shard) which have not yet been executed.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :local (Boolean)

    Return local information, do not retrieve the state from master node (default: false)

  • :master_timeout (Time)

    Specify timeout for connection to master

  • :headers (Hash)

    Custom HTTP headers

See Also:

[View source]

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/elasticsearch/api/actions/cluster/pending_tasks.rb', line 34

def pending_tasks(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cluster.pending_tasks' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cluster/pending_tasks'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end