Hello :slightly_smiling_face: I'm new with Prefect and I'd like to know if it's possible to combine ...
j
Hello 🙂 I'm new with Prefect and I'd like to know if it's possible to combine it with async ? I need smth like this:
Copy code
@task
async def mytask1():
    await do_smth()

@task
async def mytask2():
    await do_smth()

async def my_flow():
    with Flow("Test") as flow:
        await mytask1()
        mytask2()

    flow.run()
The goal is to be able to execute async functions, my flows will be synchronous between them
k
Hey @Jean-Baptiste Six, not in the current Prefect. All async stuff has to happen inside the task. This is native in Orion (Prefect 2.0) though. Check the docs here
j
@Luis Arias FYI 😕
k
For current Prefect usage, check this archived chat
j
Thanks for the answer 🙂
👍 1