MCPcopy Index your code
hub / github.com/docker/docker-py / tasks

Method tasks

docker/models/services.py:37–56  ·  view source on GitHub ↗

List the tasks in this service. Args: filters (dict): A map of filters to process on the tasks list. Valid filters: ``id``, ``name``, ``node``, ``label``, and ``desired-state``. Returns: :py:class:`list`: List of task

(self, filters=None)

Source from the content-addressed store, hash-verified

35 return self.client.api.remove_service(self.id)
36
37 def tasks(self, filters=None):
38 """
39 List the tasks in this service.
40
41 Args:
42 filters (dict): A map of filters to process on the tasks list.
43 Valid filters: ``id``, ``name``, ``node``,
44 ``label``, and ``desired-state``.
45
46 Returns:
47 :py:class:`list`: List of task dictionaries.
48
49 Raises:
50 :py:class:`docker.errors.APIError`
51 If the server returns an error.
52 """
53 if filters is None:
54 filters = {}
55 filters['service'] = self.id
56 return self.client.api.tasks(filters=filters)
57
58 def update(self, **kwargs):
59 """

Callers 4

test_tasksMethod · 0.45
test_scale_serviceMethod · 0.45

Calls

no outgoing calls

Tested by 4

test_tasksMethod · 0.36
test_scale_serviceMethod · 0.36