https://prefect.io logo
#prefect-community
Title
# prefect-community
m

matta

06/15/2020, 11:08 PM
ie, I set my think to run every 3 minutes, but then 1 run winds up taking longer than 3 minutes. Do I have to worry about this at all or will Prefect just handle it?
j

Jeremiah

06/15/2020, 11:12 PM
Hi @matta, Prefect’s runs are independent, so Prefect will start running your second run while the first one is still running. In Prefect Cloud (and soon in Prefect Server) we have a feature that allows you to limit concurrency at the flow or task level. This could be used to cap the maximum number of flow/task runs at any moment, which would help you stay under a desired limit. (Note: as an implementation detail, the local scheduler that kicks in when you use
flow.run()
in Python is synchronous and therefore WON’T start the second run until the first one is done, it would just skip it. You can take advantage of this behavior if you want but we don’t guarantee it will last in future versions of Prefect, as it’s viewed as a limitation, not a feature)
m

matta

06/15/2020, 11:13 PM
Interesting, thanks!
So, for now, I should just try to space them out far enough to prevent them from colliding?
j

Jeremiah

06/15/2020, 11:15 PM
That’s probably the simplest way! As we see more people using Prefect to hit (rate-limited) APIs, we’re also looking at better constructs for making that easier, so I’m noting your use case in our product guide
m

matta

06/15/2020, 11:16 PM
Sweet, thanks!