inet.common.task.SuccessfulTask¶
-
class inet.common.task.SuccessfulTask(name=
'task', action='', pass_keyboard_interrupt=False, task_result_class=TaskResult, **kwargs)¶ Bases:
TaskRepresents a self-contained operation that captures all necessary information in order to be run.
Initializes a new task object.
- Parameters:¶
-
run(context=
None, progress=None, index=0, count=1, print_run_start_separately=False, dry_run=False, keyboard_interrupt_handler=None, handle_exception=True, **kwargs)¶ Runs the task.
- Parameters:¶
- dry_run : bool¶
Specifies to skip the actual running of the task but do everything else.
- keyboard_interrupt_handler=
None¶ Provides a class that will handle keyboard interrupts. This allows seamless exit from running multiple tasks.
- handle_exception : bool¶
Specifies if exceptions are caught and processed or passed to the caller.
- Returns (
TaskResult): The task result.