Adam Gold
03/12/2024, 4:29 PMidempotency_key
but not sure that it fits the purpose - maybe I’m missing something?Andrew Brookins
03/12/2024, 5:52 PMGLOBAL_CONCURRENCY_LIMIT_NAME = "only-one-flow"
@flow
async def my_flow():
async with concurrency(GLOBAL_CONCURRENCY_LIMIT_NAME, occupy=1):
for x, y in [(1, 2), (2, 3), (3, 4), (4, 5)]:
await asyncio.sleep(random.randint(0, 5))
return x + y
Just be aware that the concurrency limit in this example is implicitly created in an inactive state. You can activate it from the UI.Andrew Brookins
03/12/2024, 5:52 PMAndrew Brookins
03/12/2024, 6:00 PMAndrew Brookins
03/12/2024, 6:01 PMrun_deployment
.Adam Gold
03/12/2024, 10:18 PM