You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to how a Fireworks worker will grab a single workflow, submit it, and then shutdown once the workflow completes, we'd also like to replicate this with a LocalAgent in prefect.
Currently, I think the best way to do this is by overwriting LocalAgent's _get_ready_flow_runs method and changing the following line:
# original lineflow_run_ids=set(result.data.get_runs_in_queue.flow_run_ids)
# new code that reduces this query to a single flow runflow_run_ids=set(result.data.get_runs_in_queue.flow_run_ids)
flow_run_ids=set([flow_run_ids.pop()]) ifflow_run_idselseflow_run_ids# new line
We'd then run LocalAgent with max_polls=1. This Agent will also automatically shut down without running anything if no flow runs are available.
The text was updated successfully, but these errors were encountered:
Similar to how a Fireworks worker will grab a single workflow, submit it, and then shutdown once the workflow completes, we'd also like to replicate this with a LocalAgent in prefect.
Currently, I think the best way to do this is by overwriting LocalAgent's
_get_ready_flow_runs
method and changing the following line:We'd then run
LocalAgent
withmax_polls=1
. This Agent will also automatically shut down without running anything if no flow runs are available.The text was updated successfully, but these errors were encountered: