Hello, I am migrating some of my prefect v1 flows to v2. But I am having a issue with running a task from another task. I read in the documentation this can be done by calling .fn(). I am trying to do this with the prefect_gcp package on the cloud_storage_upload_blob_from_string task. When executing this from the function with a @flow decorator it works. However when calling this from a task directly with .fn() it seems to do nothing and just skip the execution. Anybody has a idea?
n
Nate
03/27/2023, 3:39 PM
hi @David - the underlying function is async, are you
await
ing it?
i imagine its not executing because you're just creating the coroutine
note that this task contains a logger, so you'd have to disable the logger to use it with
.fn()
. I might recommend calling it as a task from a subflow
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.