Matthew Bell
04/06/2024, 10:25 PMMarvin
04/06/2024, 10:25 PMNate
04/06/2024, 10:30 PMIn [1]: from prefect import flow, task
In [2]: @task
...: def foo():
...: @task
...: def bar():
...: pass
...: bar()
In [3]:
In [3]: @flow
...: def baz():
...: foo()
...:
In [4]: baz()
17:30:18.657 | INFO | prefect.engine - Created flow run 'gentle-crocodile' for flow 'baz'
17:30:19.232 | INFO | Flow run 'gentle-crocodile' - Created task run 'foo-0' for task 'foo'
17:30:19.235 | INFO | Flow run 'gentle-crocodile' - Executing 'foo-0' immediately...
17:30:19.605 | INFO | Task run 'foo-0' - Created task run 'bar-0' for task 'bar'
17:30:19.607 | INFO | Task run 'foo-0' - Executing 'bar-0' immediately...
17:30:20.083 | INFO | Task run 'bar-0' - Finished in state Completed()
17:30:20.231 | INFO | Task run 'foo-0' - Finished in state Completed()
17:30:20.438 | INFO | Flow run 'gentle-crocodile' - Finished in state Completed('All states completed.'
Matthew Bell
04/07/2024, 9:00 PM