Hello! V2.0 question: I am creating flow runs with...
# prefect-community
p
Hello! V2.0 question: I am creating flow runs without a deployment from the API. I can see the flow run being created in the database but my agent will not pick it up. The moment I add a deployment id to the flow run in the db, the agent starts working on it. Is this expected behavior? Thanks!
this is the code I am using to create the flow run
Copy code
def create_flow_run(flow: dict):
    payload = dict(
        name = 'my_run',
        flow_id = flow['id'],
        flow_runner = dict(
            type = 'docker',
            config = dict(
                image = 'my-prefect-orion',
                image_pull_policy = 'IF_NOT_PRESENT',
                networks = ['prefect'],
                env = {
                    "USE_SSL": False,
                    "AWS_ACCESS_KEY_ID": "*****",
                    "AWS_SECRET_ACCESS_KEY": "******",
                    "ENDPOINT_URL": '<http://minio:9000>',
                }
            )
        ),
        state = dict(type='SCHEDULED'),
        parameters = dict(),
    )
    resp = <http://session.post|session.post>(f'{ORION_SERVER_URL}/api/flow_runs', json=payload)
k
I think this is expected. Quick Runs are attached to deployments and agents pick up deployments
p
thanks!