prefect
prefect copied to clipboard
[task scheduling] add `TaskServer.execute_task_run`
this PR adds an execute_task_run method that runs a TaskServer for the duration of a single task run, which is very convenient for testing and other one-off use of the TaskServer
after some engine / task_runner exploration / learning with @abrookins, in the short term we were able to make a couple small resource management improvements
Notes (afaict)
- without calling
.result()on thePrefectFuturewe get back fromsubmit_autonomous_task_run_to_engine,waitis never called on theConcurrentTaskRunner, so we never exit theEngineContext(whereas withSequentialTaskRunner, we needn't call.result()because we're not waiting for anEventto be set) - it may be prudent to use
wait_for_task_runs_and_report_crashesin some way with thePrefectFutureinstances we get back inTaskServerinstead of the current approach ofstart_soonfor eachPrefectFuture._result
Deploy Preview for prefect-docs-preview ready!
| Name | Link |
|---|---|
| Latest commit | 90f52df23eb5975589ba33c6b1f1911a9c7edf86 |
| Latest deploy log | https://app.netlify.com/sites/prefect-docs-preview/deploys/65cf8af8323fac0008b6957d |
| Deploy Preview | https://deploy-preview-12002--prefect-docs-preview.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.