Tony Popov
10/03/2022, 1:16 AMclass Result:
pass
@task
async def my_task_1(arg: str) -> Result:
...
@task
async def my_task_2(arg: Result) -> None:
...
Question
Doc says I can do await my_task_1('arg')
in a flow, although mypy says my_task_1('arg')
is not awaitable
Is following a best practice?
task_result = await my_task.submit('arg')
result = await task_result.result()
await my_task_2.submit(result)
Bianca Hoch
10/03/2022, 10:27 PMTony Popov
10/04/2022, 6:26 AMBianca Hoch
10/04/2022, 6:43 PM