Tom Klein
08/08/2023, 9:56 AMredsquare
08/08/2023, 10:03 AMTom Klein
08/08/2023, 2:08 PMredsquare
08/08/2023, 2:11 PMTom Klein
08/08/2023, 2:50 PMTom Klein
08/08/2023, 2:51 PMNate
08/08/2023, 5:00 PMi’d expect the agent to launch jobs (distinct from itself) ,
and the worker to poll for work that it does itself (as an internal process)these statements are true in some cases 🙂 agents do launch flow runs (jobs) , but agents are not strongly typed, so they look at the infra attached to a scheduled deployment's flow run and use that to decide how it should be submitted. if its a deployment with process type infra, it will run right there in the agent process. if its docker / k8s, it will try to submit the flow run as a container to a docker / k8s environment that it has access to. the worker does effectively the same thing, except there's no ambiguity about how the worker will submit the flow run, bc X type workers can only submit flow runs from X type work pools (e.g. X = Process, K8s, ECS etc) - workers also have extra features like understanding
pull
steps and can generally be thought of as next generation agents (that serve the same larger purpose as agents - i.e. submitting work to an execution environment)
it makes more sense to have (a) dedicated worker(s) that just runs each incoming flow as a process…i agree with your intuition, you could easily have a process type worker than just picks up and runs the flow run itself when its triggered, as opposed to a k8s type worker that would submit that new work as a new job / pod