https://prefect.io logo
Title
j

jaehoon

05/24/2021, 9:40 AM
Hi prefect family! I use parameterized flow run with 'idempotency_key' like this
test_flow.run(parameters=dict(account_id=account.id), idempotency_key=str(account.id))
I wanna run flows with new unique idempotency_key every time what's the best practice? Is there any good method in Prefect module? plz help me!
k

Kevin Kho

05/24/2021, 1:02 PM
Hi @jaehoon, maybe use something related to datetime to get a unique key
šŸ™ 1
z

Zach Schumacher

05/24/2021, 1:59 PM
i’d use the uuid module if you want it to be a string, or if you want an int you could use the epoch timestamp
šŸ‘ 2
j

jaehoon

05/25/2021, 2:25 AM
thanks! using datetime or uuid as unique id will be best way i'll try it!šŸ˜€