controller
Attributes¶
logger = structlog.getLogger()
module-attribute
¶
Classes¶
PipelineController
¶
Bases: PipelineListener
Source code in kiara/models/module/pipeline/controller.py
20 21 22 |
|
SinglePipelineController
¶
Bases: PipelineController
Source code in kiara/models/module/pipeline/controller.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
|
Attributes¶
pipeline: Pipeline
property
writable
¶
Functions¶
current_pipeline_state() -> PipelineState
¶
Source code in kiara/models/module/pipeline/controller.py
55 56 57 58 59 |
|
can_be_processed(step_id: str) -> bool
¶
Check whether the step with the provided id is ready to be processed.
Source code in kiara/models/module/pipeline/controller.py
61 62 63 64 65 66 67 |
|
can_be_skipped(step_id: str) -> bool
¶
Check whether the processing of a step can be skipped.
Source code in kiara/models/module/pipeline/controller.py
69 70 71 72 73 74 75 |
|
set_processing_results(job_ids: Mapping[str, uuid.UUID]) -> Mapping[uuid.UUID, uuid.UUID]
¶
Set the processing results as values of the approrpiate step outputs.
Returns:
Type | Description |
---|---|
Mapping[uuid.UUID, uuid.UUID]
|
a dict with the result value id as key, and the id of the job that produced it as value |
Source code in kiara/models/module/pipeline/controller.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
pipeline_is_ready() -> bool
¶
Return whether the pipeline is ready to be processed.
A True
result means that all pipeline inputs are set with valid values, and therefore every step within the
pipeline can be processed.
Returns:
Type | Description |
---|---|
bool
|
whether the pipeline can be processed as a whole ( |
Source code in kiara/models/module/pipeline/controller.py
112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
process_step(step_id: str, wait: bool = False) -> uuid.UUID
¶
Kick off processing for the step with the provided id.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
step_id |
str
|
the id of the step that should be started |
required |
Source code in kiara/models/module/pipeline/controller.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
|
SinglePipelineBatchController
¶
Bases: SinglePipelineController
A [PipelineController][kiara.models.modules.pipeline.controller.PipelineController] that executes all pipeline steps non-interactively.
This is the default implementation of a PipelineController
, and probably the most simple implementation of one.
It waits until all inputs are set, after which it executes all pipeline steps in the required order.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pipeline |
Pipeline
|
the pipeline to control |
required |
auto_process |
bool
|
whether to automatically start processing the pipeline as soon as the input set is valid |
True
|
Source code in kiara/models/module/pipeline/controller.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
|
Attributes¶
auto_process: bool
property
writable
¶
Functions¶
process_pipeline()
¶
Source code in kiara/models/module/pipeline/controller.py
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
|