https://prefect.io logo
v

vinoth paari

02/09/2022, 7:50 AM
Hi Flowrun values is same when i call the task from other task . i want generate multiple flow run for each call to task
k

Kevin Kho

02/09/2022, 7:54 AM
create_flow_run
takes a
idempotency_key
. You need to supply different ones to each call to spin a new flow run. The same key does not trigger a new flow run
v

vinoth paari

02/09/2022, 7:56 AM
can i generate new flowid in loop
whenever i call this task . i want new flow shd be generate
k

Kevin Kho

02/09/2022, 7:57 AM
pass in an idempotency_key based on the datetime as a string and it will kick off new runs
create_flow_run.run(…, idempotency_key=str(datetime.datetime.now()))
or something like that so it will always be unique during the loop
v

vinoth paari

02/09/2022, 8:00 AM
great