Hi, a simple question for Prefect1.0, I define a f...
# ask-community
c
Hi, a simple question for Prefect1.0, I define a function (but not decorated with @task decorator). This function does a third party API call to return a list of dictionary. Use case is this function will be called in
with Flow
block and the list it returns will be used in
create_flow_run.map(parameters=...)
, My question is when we deployed the flow (it runs every midnight), will the function we defined be called each time when Flow is scheduled to run?
n
Hi @Chu, I think the short answer is yes each time you run your flow, everything within the
with Flow(...) as flow:
block will be run, whether these are prefect tasks being run or regular python functions being called does that answer your question?
c
yes, even if the function is defined out side of the with Flow block right?
n
yep! but becuase its not a task, it won't show up in the logs