Is there a way to pass a `PrefectFuture` to a down...
# prefect-community
b
Is there a way to pass a
PrefectFuture
to a downstream task or does the task result always get evaluated and then passed as an argument?
1
m
Hey @Barada Sahu calling .submit() on a task creates a prefect future, you can check out more about this here https://docs.prefect.io/concepts/task-runners/?h=submit#using-results-from-submitted-tasks.
b
@Mason Menges the downstream task is receiving the evaluated result of the , even though I pass a PrefectFuture (returned object from .submit()) as the argument to it . see below 👇
Copy code
def test_flow(nums: list = None):
    test_futures = [square.submit(num) for num in nums]
    return do_cleanup.submit(test_futures)
do_cleanup
is receiving a list of returned values and not the futures