trapped
03/02/2020, 8:09 AMAlex Goodman
03/02/2020, 1:03 PMquery_flow_runs
https://github.com/PrefectHQ/prefect/blob/master/src/prefect/agent/agent.py#L313), however, this would not limit concurrency, it would only serve to throttle how often flow runs are started. To limit concurrency you would need to monitor the number of running flow runs to influence the result of query_flow_runs
. Assuming you are using the DockerAgent, this would mean monitoring the number of child processes (which is roughly equal to the number of flow runs be run by this agent): https://github.com/PrefectHQ/prefect/blob/master/src/prefect/agent/docker/agent.py#L87trapped
03/02/2020, 2:00 PMtrapped
03/04/2020, 9:54 AMAgent
class and redefining the agent_process
method; works great!