rs_workflows/flow_utils.md
Utility module for the Prefect flows.
DprProcessIn
dataclass
Input parameters for the 'dpr-process' flow
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
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 | |
DprProcessOut
dataclass
Output parameters for the 'dpr-process' flow
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
202 203 204 205 206 207 208 209 | |
FlowEnv
Prefect flow environment and reusable objects.
Attributes:
| Name | Type | Description |
|---|---|---|
owner_id |
str
|
User/owner ID |
calling_span |
SpanContext | None
|
OpenTelemetry span of the calling flow, if any. |
this_span |
SpanContext | None
|
Current OpenTelemetry span. |
rs_client |
RsClient
|
RsClient instance |
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
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 146 147 148 149 150 151 152 153 154 155 | |
__init__(args)
Constructor.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
serialize()
Serialize this object with Pydantic.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
117 118 119 120 121 122 123 124 125 126 127 128 129 | |
start_span(instrumenting_module_name, name)
Context manager for creating a new main or child OpenTelemetry span and set it as the current span in this tracer's context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instrumenting_module_name
|
str
|
Caller module name, just pass name |
required |
name
|
str
|
The name of the span to be created (use a custom name) |
required |
Yields:
| Type | Description |
|---|---|
Span
|
The newly-created span. |
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | |
FlowEnvArgs
dataclass
Prefect flow environment arguments.
Attributes:
| Name | Type | Description |
|---|---|---|
owner_id |
str
|
User/owner ID (necessary to retrieve the user info: API key and OAuth2 cookie) |
from |
the right Prefect block. NOTE
|
may be useless after each user has their own prefect |
calling_span |
tuple
|
Serialized OpenTelemetry span of the calling flow, if any. |
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
Priority
Bases: str, Enum
Priority for the cluster dask to be able to prioritise task execution.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
34 35 36 37 38 39 40 41 | |
ProcessingMode
Bases: str, Enum
List of mode to be applied when calling the DPR processor.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
54 55 56 57 58 59 60 61 62 63 | |
WorkflowType
Bases: str, Enum
Workflow type.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
44 45 46 47 48 49 50 51 | |