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

Option to clear only old history entries #293

Open
torfsen opened this issue Jun 20, 2017 · 2 comments
Open

Option to clear only old history entries #293

torfsen opened this issue Jun 20, 2017 · 2 comments
Labels

Comments

@torfsen
Copy link
Contributor

torfsen commented Jun 20, 2017

Currently we have the clearsource_history paster command for deleting old jobs but keeping the sources and the datasets. This is nice, but would be even better if we could use it to only delete the older jobs and keep more recent ones, e.g. something like

paster clearsource_history --older-than 30d

to remove all jobs older than 30 days.

@pduchesne
Copy link

Is this planned ?

I think this is more than nice-to-have.
I had to clear history for a harvest source (db got bloated because of the many harvest objects). But by doing so, all harvest objects being gone, the harvester (CSW in my case) could no longer find its previous harvested objects, and re-harvested the whole source. And duplicated the data.

So I think clearsource_history should at least preserve the most recent/currently active harvest object.

@seitenbau-govdata
Copy link
Member

Related PR: #484
With the new option -k true (with the CKAN click command) the latest harvest jobs with the current harvest objects will be preserved.

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

No branches or pull requests

4 participants