How are results and caches cleaned up over time to prevent unnecessary storage consumption?
j
Jeff Hale
06/20/2024, 3:21 PM
Results persisted to your storage aren’t deleted by Prefect, but folks sometimes run a script to cleanup. I’ll see if I can find an example.
a
Aj Floersch
06/20/2024, 3:22 PM
Awesome! That's what I was wondering, if folks generally create a flow dedicated to cleanup for things like this.
j
Jeff Hale
06/20/2024, 3:43 PM
Modified my response - we don’t store the results in the DB, if they are persisted, they are persisted locally by default or wherever you set up for them to be stored. Not finding a script, but I thought there was one in Slack. Will check more in a bit.
Jeff Hale
06/20/2024, 5:13 PM
You can just use the Pathlib library to delete the results files, something like this - and put it in a flow if you like.