I have a "best practices" question. We have a syn...
# ask-community
h
I have a "best practices" question. We have a sync-type job that we'd like to run every minute. The "easy button" was to just make a Prefect Deployment with an interval of 60. However, I'm not sure if this is the best idea. • The ergonomics in "Flow Runs" is not great as the future-scheduled Flow Runs hide any "real" flow runs without a lot of scrolling. • I'm not sure if we'll have db performance issues with so many flow runs? Is there a mechanism to prune these from database to alleviate that concern? • Anything else that I might not be thinking of that make this a bad idea?
b
Hi Hans, if you're looking to avoid having a bunch of scheduled runs, my thinking as that you could either call
run_deployment
at the end of each sync-job to kick off another sync, or alternatively if you're using Prefect Cloud, set up an automation which kicks off a deployment of the sync-job whenever the previous flow run enters a state of
Complete
^This is a more event-based approach, but it would at least mitigate having a bunch of scheduled runs populate in the UI
h
Thank you! These are helpful ideas.
(We are using prefect server, so the first approach sounds more practical for our setup.) I guess just run deployment with a schedule in future or I guess a simple sleep until the minute has elapsed.