Modules¶
task¶
-
class
refit.task.
Concurrent
(host_class)[source]¶ Bases:
refit.task.Task
Bundles several tasks to be run concurrently.
-
class
refit.task.
Task
(host_class)[source]¶ Bases:
refit.mixins.apt.AptMixin
,refit.mixins.docker.DockerMixin
,refit.mixins.file.FileMixin
,refit.mixins.path.PathMixin
,refit.mixins.python.PythonMixin
,refit.mixins.template.TemplateMixin
-
classmethod
create
(host_registry, environment)[source]¶ Creates and runs a task for all matching hosts.
- Return type
None
-
abstract async
run
()[source]¶ Override in subclasses. This is what does the actual work in the task, and is awaited when the Task is run.
- Return type
None
-
sub_tasks
= []¶
-
classmethod
-
refit.task.
new_gathered_task
(tasks)[source]¶ Task definitions are classes, not instances, hence why we require this.
- Parameters
tasks (
Iterable
[Type
[Task
]]) – A list of Task classes to execute.- Return type
Type
[Concurrent
]
registry¶
-
class
refit.registry.
HostRegistry
[source]¶ -
get_host_classes
(environment, tags)[source]¶ Returns hosts matching the given tags.
If no tags are given, all hosts match.
- Return type
Sequence
[Type
[Host
]]
-