prefect.runner.submit
submit_to_runner(prefect_callable, parameters=None, retry_failed_submissions=True)
async
submit_to_runner(prefect_callable: Union[Flow, Task], parameters: Dict[str, Any], retry_failed_submissions: bool = True) -> FlowRun
submit_to_runner(prefect_callable: Union[Flow, Task], parameters: List[Dict[str, Any]], retry_failed_submissions: bool = True) -> List[FlowRun]
Submit a callable in the background via the runner webserver one or more times.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prefect_callable
|
Union[Flow, Task]
|
the callable to run (only flows are supported for now, but eventually tasks) |
required |
parameters
|
Optional[Union[Dict[str, Any], List[Dict[str, Any]]]]
|
keyword arguments to pass to the callable. May be a list of dictionaries where each dictionary represents a discrete invocation of the callable |
None
|
retry_failed_submissions
|
bool
|
Whether to retry failed submissions to the runner webserver. |
True
|
Source code in src/prefect/runner/submit.py
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 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
|
wait_for_submitted_runs(flow_run_filter=None, task_run_filter=None, timeout=None, poll_interval=3.0)
async
Wait for completion of any provided flow runs (eventually task runs), as well as subflow runs of the current flow run (if called from within a flow run and subflow runs exist).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
flow_run_filter
|
Optional[FlowRunFilter]
|
A filter to apply to the flow runs to wait for. |
None
|
task_run_filter
|
Optional[TaskRunFilter]
|
A filter to apply to the task runs to wait for. # TODO: /task/run |
None
|
timeout
|
Optional[float]
|
How long to wait for completion of all runs (seconds). |
None
|
poll_interval
|
float
|
How long to wait between polling each run's state (seconds). |
3.0
|
Source code in src/prefect/runner/submit.py
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 231 232 |
|