Can anyone explain why this never completes? I've ...
# prefect-community
t
Can anyone explain why this never completes? I've also tried it with a dask runner and it also hangs. This is with Prefect 2
Copy code
from prefect import flow, task


@task
def task1(x: int) -> int:
    return x + 10


@task
def task2(x: int) -> int:
    return -x


@flow()
def run_my_flow(n: int):
    task2.map(task1.map(range(n)))


if __name__ == "__main__":
    n = 500
    print(run_my_flow(n))
1
👀 1
j
Hi Trevor. I tried your code with n=5 and n=100 and it runs fine. With n=500 I observed the same hanging behavior as you. Adding a sleep timeout of .1 in the tasks doesn’t make it stop hanging, and neither does changing the log level to critical. I’ll ask my colleagues if they know why it’s hanging.
🙏 1
t
Hi @Jeff Hale Any update on this? Should I file a github issue on this
j
Hi Trevor. I think opening an issue would be good. It’s next up on priorities for one of our engineers to investigate, but it would be nice to have it memorialized in an issue so none of the details of your case get lost.
a
can you link the issue here @Trevor Kramer?
t