heat.engine.scheduler.
DependencyTaskGroup
(dependencies, task=<function DependencyTaskGroup.<lambda>>, reverse=False, name=None, error_wait_time=None, aggregate_exceptions=False)[source]¶Bases: object
Task which manages group of subtasks that have ordering dependencies.
heat.engine.scheduler.
ExceptionGroup
(exceptions=None)[source]¶Bases: Exception
Container for multiple exceptions.
This exception is used by DependencyTaskGroup when the flag aggregate_exceptions is set to True and it’s re-raised again when all tasks are finished. This way it can be caught later on so that the individual exceptions can be acted upon.
heat.engine.scheduler.
TaskRunner
(task, *args, **kwargs)[source]¶Bases: object
Wrapper for a resumable task (co-routine).
run_to_completion
(wait_time=1, progress_callback=None)[source]¶Run the task to completion.
The task will sleep for wait_time seconds between steps. To avoid sleeping, pass None for wait_time.
heat.engine.scheduler.
Timeout
(task_runner, timeout)[source]¶Bases: BaseException
Raised when task has exceeded its allotted (wallclock) running time.
This allows the task to perform any necessary cleanup, as well as use a different exception to notify the controlling task if appropriate. If the task suppresses the exception altogether, it will be cancelled but the controlling task will not be notified of the timeout.
heat.engine.scheduler.
task_description
(task)[source]¶Return a human-readable string description of a task.
The description is used to identify the task when logging its status.
heat.engine.scheduler.
wrappertask
(task)[source]¶Decorator for a task that needs to drive a subtask.
This is essentially a replacement for the Python 3-only “yield from” keyword (PEP 380), using the “yield” keyword that is supported in Python 2. For example:
@wrappertask
def parent_task(self):
self.setup()
yield self.child_task()
self.cleanup()
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.