I have an interesting issue that I am running into...
# ask-community
k
I have an interesting issue that I am running into. I have a flow that looks roughly like:
Copy code
from settings import JOB_QUEUE, JOB_DEF

@task
def trigger_batch_job(input):
    ...
    return BatchSubmit(
        job_name=job_name,
        job_definition=JOB_DEF,
        job_queue=JOB_QUEUE,
        batch_kwargs=...,
    ).run()


with Flow(...):
    inputs = some_task()
    wait_res = AWSClientWait(
        client='batch',
        waiter_name='JobComplete',
    )(
        waiter_kwargs={
            'jobs': [
                trigger_batch_job(inputs),
            ],
            'WaiterConfig': {
                'Delay': 10,
                'MaxAttempts': 10000,
            },
        },
    )
And a settings.py file that looks like:
Copy code
# settings.py
import os

JOB_DEF = os.environ.get(
    'PREFECT_FLOWS_JOB_DEF',
    'job-latest',
)

JOB_QUEUE = os.environ.get(
    'PREFECT_FLOWS_JOB_QUEUE',
    'job-gpu-dev',
)
The idea here is to have dynamic values for these settings based on what environment this is running in (we have dev/test/prod AWS accounts)