Table Of Contents
Table Of Contents

MultipleTasks

from inet.common.task

class MultipleTasks(tasks=[], name='task', concurrent=True, randomize=False, chunksize=1, scheduler='thread', cluster=None, multiple_task_results_class=<class 'inet.common.task.MultipleTaskResults'>, **kwargs)[source]

Bases: object

Represents multiple tasks that can be run together.

Initializes a new multiple tasks object.

Parameters
  • tasks (List of Task) – The list of individual tasks that are run when this multiple tasks is run.

  • name (string) – A human readable short description of the multiple tasks, usually a noun.

  • concurrent (bool) – Specifies if the individual tasks are run sequentially or concurrently.

  • randomize (bool) – Specifies if the order of execution is random or follows the order of storage for the tasks.

  • chunksize (integer) – The number of tasks that are run together in a single batch if the tasks are running concurrently.

  • scheduler (string) – Specifies how the tasks are scheduled. Valid values are “process”, “thread”, and “cluster”.

  • multiple_task_results_class (string) – The Python class name of the produced multiple task results object.

Methods

rerun

Runs the tasks again.

run

Runs all tasks sequentially or concurrently.

Attributes

rerun(**kwargs)[source]

Runs the tasks again.

Returns (MultipleTaskResults):

The task results.

run(**kwargs)[source]

Runs all tasks sequentially or concurrently.

Parameters

kwargs (dict) – Additional parameters are inherited from Task.run().

Returns (MultipleTaskResults):

The task results.