Andreas Nord
02/05/2024, 12:57 PMfrom prefect import task, flow
from prefect.utilities.annotations import quote
@task
def big_output():
return [1 for _ in range(10**7)]
@task
def big_input(x):
print(len(x))
@flow
def slow_flow():
x = big_output.submit()
big_input.submit(quote(x))
if __name__ == "__main__":
slow_flow()
I'm trying to get the big_input task to start quickly after big_output task, but I get this error:
TypeError: object of type 'PrefectFuture' has no len()