client.swarm.task ================= .. py:module:: client.swarm.task .. autoapi-nested-parse:: Swarm side task object. Attributes ---------- .. autoapisummary:: client.swarm.task.logger Classes ------- .. autoapisummary:: client.swarm.task.SwarmTask Module Contents --------------- .. py:data:: logger .. py:class:: SwarmTask(task_id: int, array_id: int, status: str, max_attempts: int, task_resources: jobmon.client.task_resources.TaskResources, cluster: jobmon.core.cluster.Cluster, resource_scales: Optional[Dict] = None, fallback_queues: Optional[List[jobmon.core.cluster_protocol.ClusterQueue]] = None, compute_resources_callable: Optional[Callable] = None) Bases: :py:obj:`object` Swarm side task object. Implementing swarm behavior of tasks. :param task_id: id of task object from db auto increment. :param array_id: id of associated array object. :param status: status of task object. :param max_attempts: maximum number of task_instances before failure. :param task_resources: callable to be executed when Task is ready to be run and resources can be assigned. :param cluster: The name of the cluster that the user wants to run their tasks on. :param resource_scales: Specifies how much a user wants to scale their requested resources after failure. :param fallback_queues: A list of queues that users want to try if their original queue isn't able to handle their adjusted resources. :param compute_resources_callable: callable compute resources. .. py:attribute:: task_id .. py:attribute:: array_id .. py:attribute:: status .. py:attribute:: downstream_swarm_tasks :type: Set[SwarmTask] .. py:attribute:: current_task_resources .. py:attribute:: compute_resources_callable :value: None .. py:attribute:: fallback_queues :value: None .. py:attribute:: resource_scales .. py:attribute:: cluster .. py:attribute:: max_attempts .. py:attribute:: num_upstreams :type: int :value: 0 .. py:attribute:: num_upstreams_done :type: int :value: 0 .. py:property:: all_upstreams_done :type: bool Return a bool of if upstreams are done or not. .. py:property:: downstream_tasks :type: List[SwarmTask] Return list of downstream tasks.