https://prefect.io logo
Title
p

Prasanth Kothuri

12/23/2021, 2:12 PM
We run flows every 30 minutes which means we accumulate lot of flow runs , can I specify retention on flow runs ? if not where is this data stored so that I can setup a script to do periodic cleanups
a

Anna Geller

12/23/2021, 2:17 PM
Just to be sure: are you asking for Server? if so, then you have several options: 1. You can build some script that regularly deletes old flow runs directly from the database. 2. You can do the same as #1 using GraphQL: first query for old flow run ids, then use a mutation delete_flow_run if you’re asking for Cloud - we do this automatically based on the retention period specified in your Cloud plan.
p

Prasanth Kothuri

12/23/2021, 2:23 PM
thanks @Anna Geller this is for Server , is there any documentation on schema , tables where this information is stored ?
a

Anna Geller

12/23/2021, 2:25 PM
I haven’t seen any documentation about that but you can use any SQL client e.g. DBeaver to explore the tables and understand the schema better
p

Prasanth Kothuri

12/23/2021, 3:30 PM
ok, I will script up something in GraphQL, thanks a ton
👍 1