Hi Prefect Team, I have been using Airflow for some time. Heard about Prefect and gave it a try. Awesome product. I wanted some help on the following as it is an essential requirement for us :-
• I have a ETL flow which runs every minute. It loads data from available in Kafka and processes it.
• Sometime, the data in Kafka is very high and the flow continues beyond 1 minute. This leads to a pileup of scheduled flow runs.
• Wanted to know if it is possible to not start the next scheduled flow run if the previous run of the flow is still running?
I think, the Cloud concurrency feature is one solution. But unfortunately my system has very patchy internet(which is why data load fluctuates). So Cloud is not an option at present.
1 year ago
Hi Nitin, Hope you are well.
NB: I'm pretty new with Prefect also, but I think (yes) that your request is possible.
Note: There may be a better/nicer was to do this, than what I suggest below 😃
• Add an initial task to your flow, to test and skip if a previous one is running
• You can query the backend about flows - either through the existing Python methods, or through GraphQL directly.
◦ Have a look at
Hey @Nitin Madhavan, John is pretty right here. In general, I think 1 minute flows is the lowest Prefect can go reliably. You can use the GraphQL API to query for existing flow runs, and if there are, just SKIP the rest to the flow.