https://prefect.io logo
k

karteekaddanki

07/17/2020, 12:53 PM
Hey guys, Is 
FlowRunTask
 expected to update the runs of the child flow in prefect cloud? I'm not seeing it. I'm trying to implement backfill functionality using 
FlowRunTask
 inside a generic wrapper flow. Any help on the idiomatic way to achieve backfill functionality would be appreciated.
n

nicholas

07/17/2020, 1:15 PM
Hi @karteekaddanki, can you clarify what you mean? The FlowRunTask is only responsible for creating a new Flow Run, which then becomes its own independent entity.
k

karteekaddanki

07/17/2020, 1:49 PM
Sorry. Turns out I need to actually run the
FlowRunTask
that I created for it to actually run. I am trying to get it work. I'll post any further issues that I encounter in this thread. Thanks for your quick response.
n

nicholas

07/17/2020, 1:59 PM
No worries @karteekaddanki - I've also been notified that the
FlowRunTask
can await the return of the Flow Run it creates, and then take on the status of that Flow Run, so that may be helpful to what you're doing.
k

karteekaddanki

07/17/2020, 4:41 PM
Okay I made it work. It wasn't working earlier because of the context in which i was initializing the task. This works without any issues
Copy code
task = FlowRunTask()
with Flow("foo") as flow:
    task.run()
but this doesn't
Copy code
with Flow("foo") as flow:
    task = FlowRunTask()    
    task.run()
This distinction is in the docs but might be worth highlighting.
n

nicholas

07/17/2020, 4:51 PM
Glad you got it solved @karteekaddanki! Feel free to PR the docs if you find that could use some clarifying.
k

karteekaddanki

07/17/2020, 5:05 PM
Sure thing. Thanks so much for your help. You did an amazing job with Prefect. It solves a lot of our use cases.
🚀 2