https://prefect.io logo
Title
d

David

03/27/2023, 1:53 PM
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
👍 1
d

David

03/29/2023, 12:47 PM
@Nate thanks for the good reply