Alexander Belikov
04/12/2022, 8:59 AMAnna Geller
04/12/2022, 10:54 AMflow.run()
since this is meant only for local development.@task(log_stdout=True)
• to add parameters for the "sleep time" in between runs, you can also use a Parameter task
• instead of calling a flow, you could also call a normal parametrized Python function when looping - perhaps that would be easier to manage?Alexander Belikov
04/12/2022, 12:36 PMsleep
Calling a task from a flow is not supported, but it works (and the reference I gave cite prefect slack as the source of recommendation), so will you called a hack that should be avoided?
instead of calling a flow, you could also call a normal parametrized Python function when loopingIndeed it would easier
Anna Geller
04/12/2022, 12:44 PMCalling a task from a flow is not supported, but it worksCalling a task from a Flow is supported, but calling a Flow from a task is not - perhaps you misread my message? 🙂 Regarding Gaetan's StackOverflow answer, this is not a pattern I would recommend.
I was wondering if there is a "prefectonic" way of doingYou can alternatively use thesleep
create_flow_run
task with a custom scheduled_start_time
but this will have the same effect.Alexander Belikov
04/12/2022, 12:49 PMscheduled_start_time
sounds great, will check it outAnna Geller
04/12/2022, 1:02 PMscheduled_start_time
is the right solution to your problem, it was only to answer your question