Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling cleanup of assets when deleting STAC Items #323

Open
drnextgis opened this issue Nov 25, 2024 · 1 comment
Open

Handling cleanup of assets when deleting STAC Items #323

drnextgis opened this issue Nov 25, 2024 · 1 comment

Comments

@drnextgis
Copy link
Collaborator

The delete_item function in pgstac allows for deleting STAC items. However, in most cases, it's not enough to simply remove the records from the database; the underlying assets referenced by the deleted items also need to be cleaned up.

It might be beneficial to introduce an internal table to track deleted items. This would make it easier to integrate with an external cron job that can handle the deletion of assets and the cleanup of the tracking table.

Has anyone encountered and resolved this issue before?

@bitner
Copy link
Collaborator

bitner commented Dec 5, 2024

I think this is squarely outside the purview of pgstac. I think that you could create a script outside of pgstac that looked up an item, scanned for those assets, delete those assets first, then delete the item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants