1
1
from .utils import NamespacedClient , query_params , _make_path , SKIP_IN_PATH
2
2
3
3
class TasksClient (NamespacedClient ):
4
- @query_params ('actions' , 'detailed' , 'group_by' , 'node_id ' , 'parent_node' ,
5
- 'parent_task ' , 'wait_for_completion' )
6
- def list (self , task_id = None , params = None ):
4
+ @query_params ('actions' , 'detailed' , 'group_by' , 'nodes ' , 'parent_node' ,
5
+ 'parent_task_id ' , 'wait_for_completion' )
6
+ def list (self , params = None ):
7
7
"""
8
8
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html>`_
9
9
@@ -13,20 +13,20 @@ def list(self, task_id=None, params=None):
13
13
:arg detailed: Return detailed task information (default: false)
14
14
:arg group_by: Group tasks by nodes or parent/child relationships,
15
15
default 'nodes', valid choices are: 'nodes', 'parents'
16
- :arg node_id : A comma-separated list of node IDs or names to limit the
16
+ :arg nodes : A comma-separated list of node IDs or names to limit the
17
17
returned information; use `_local` to return information from the
18
18
node you're connecting to, leave empty to get information from all
19
19
nodes
20
20
:arg parent_node: Return tasks with specified parent node.
21
- :arg parent_task : Return tasks with specified parent task id
21
+ :arg parent_task_id : Return tasks with specified parent task id
22
22
(node_id:task_number). Set to -1 to return all.
23
23
:arg wait_for_completion: Wait for the matching tasks to complete
24
24
(default: false)
25
25
"""
26
26
return self .transport .perform_request ('GET' , _make_path ('_tasks' ,
27
27
task_id ), params = params )
28
28
29
- @query_params ('actions' , 'node_id ' , 'parent_node' , 'parent_task ' )
29
+ @query_params ('actions' , 'nodes ' , 'parent_task_id ' )
30
30
def cancel (self , task_id = None , params = None ):
31
31
"""
32
32
@@ -36,12 +36,11 @@ def cancel(self, task_id=None, params=None):
36
36
(node_id:task_number)
37
37
:arg actions: A comma-separated list of actions that should be
38
38
cancelled. Leave empty to cancel all.
39
- :arg node_id : A comma-separated list of node IDs or names to limit the
39
+ :arg nodes : A comma-separated list of node IDs or names to limit the
40
40
returned information; use `_local` to return information from the
41
41
node you're connecting to, leave empty to get information from all
42
42
nodes
43
- :arg parent_node: Cancel tasks with specified parent node.
44
- :arg parent_task: Cancel tasks with specified parent task id
43
+ :arg parent_task_id: Cancel tasks with specified parent task id
45
44
(node_id:task_number). Set to -1 to cancel all.
46
45
"""
47
46
return self .transport .perform_request ('POST' , _make_path ('_tasks' ,
0 commit comments