https://prefect.io logo
Title
c

Chu

07/28/2022, 8:06 PM
Dear Community, I’m struggling in Prefect 1.0 for one problem, Thanks for any help!
@task('currency_orchestrator')
def call_currency_orchestrator():

    return create_flow_run(
        flow_name = "currency_orchestrator",
        project_name = "xxxx",
    )
why this throws me an error ??
aise TypeError("`fn` must be callable")
TypeError: `fn` must be callable
basically I wanna use that task to call a registered flow..
a

Anna Geller

07/28/2022, 10:36 PM
create_flow_run
is a task and you can't call tasks from other tasks
a workaround would be:
create_flow_run.run()
but this is really not recommended, you should instead move that to your flow