From 3298e1082fa9573b87f815230b35e8431949f766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Fri, 17 Jan 2014 14:39:04 +0100 Subject: [PATCH] Add the cluster.pending_tasks api --- elasticsearch/client/cluster.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/elasticsearch/client/cluster.py b/elasticsearch/client/cluster.py index 089d47b1..32560723 100644 --- a/elasticsearch/client/cluster.py +++ b/elasticsearch/client/cluster.py @@ -23,6 +23,18 @@ class ClusterClient(NamespacedClient): params=params) return data + @query_params() + def pending_tasks(self, params=None): + """ + The pending cluster tasks API returns a list of any cluster-level + changes (e.g. create index, update mapping, allocate or fail shard) + which have not yet been executed. + ``_ + """ + _, data = self.transport.perform_request('GET', '/_cluster/pending_tasks', + params=params) + return data + @query_params('filter_blocks', 'filter_index_templates', 'filter_indices', 'filter_metadata', 'filter_nodes', 'filter_routing_table', 'local', 'master_timeout', 'flat_settings')