We run flows every 30 minutes which means we accum...
# prefect-server
p
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
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
thanks @Anna Geller this is for Server , is there any documentation on schema , tables where this information is stored ?
a
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
ok, I will script up something in GraphQL, thanks a ton
👍 1