Constantino Schillebeeckx
05/09/2024, 3:50 PMKevin Grismore
05/09/2024, 6:13 PMConstantino Schillebeeckx
05/09/2024, 6:27 PMKevin Grismore
05/09/2024, 6:33 PMfrom prefect import flow, get_run_logger
@flow
def parent_flow():
logger = get_run_logger()
child_flow(logger)
@flow
def child_flow(logger):
<http://logger.info|logger.info>("Logs to parent flow")
Kevin Grismore
05/09/2024, 6:33 PMConstantino Schillebeeckx
05/09/2024, 6:34 PMConstantino Schillebeeckx
05/09/2024, 6:37 PMlogger = get_logger(use_parent=True)
Constantino Schillebeeckx
05/09/2024, 8:23 PMfrom prefect import flow, get_run_logger, task
@task
def parent_task():
logger = get_run_logger()
foo = child_flow()
<http://logger.info|logger.info>(foo)
@flow
def child_flow():
return "child flow"
@flow
def parent_flow():
parent_task()
if __name__ == "__main__":
parent_flow()
I'm seeing in the UI that there is not line/arrow linking the task to the subflow - is that expected? It doesn't make it clear visually that the task is upstream of the generated subflowKevin Grismore
05/09/2024, 8:31 PMConstantino Schillebeeckx
05/09/2024, 8:32 PM