So I missed an `await` when submitting an async ta...
# ask-community
j
So I missed an
await
when submitting an async task in my flow. When I run locally I get a warning:
Copy code
/home/jessica/source/orion/Prefect-2/venv/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py:355: RuntimeWarning: coroutine 'from_async.wait_for_call_in_loop_thread' was never awaited
  result = await coro
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
but when this is ran through a deployment in cloud i don't see this warning and no error is raised. i'm rusty with async so i may be doing something wrong, but i want to make sure that if i make a mistake like this again an exception is raised so it's not failing silently. Is there something easy to do here or something I'm missing that would solve this?
Here's how the flow looked with the missing await, for reference
Copy code
@flow(flow_run_name=generate_flow_name)
async def flow(
    client_id: int,
    remote_folder: str,
    ftp_conn_str_block: str,
    pgp_key_id: str,
    runtime_config: Optional[RuntimeConfig] = None,
):
    data = get_data()

    format_kwargs = get_string_format_variables()
    save_dir = SAVE_FOLDER.format(**format_kwargs)  # type: ignore

    conn_str = get_client_conn_str(client_id)

    output_files = []
    for query_key, query in data["queries"].items():
        columns = data["columns"][query_key]
        filename = data["files"][query_key]["filename"]
        result = await query_data.submit(conn_str, query, filename)  # type: ignore
        result = await clean_data.submit(result, columns, filename)  # type: ignore
        output_file = await save_file.submit(result, save_dir, filename)  # type: ignore
        output_files.append(output_file)

    process_and_upload_files.submit(save_dir, output_files, pgp_key_id, ftp_conn_str_block, remote_folder)