~cjwatson/python-oops-datedir-repo/py3

« back to all changes in this revision

Viewing changes to oops_datedir_repo/prune.py

  • Committer: William Grant
  • Date: 2012-09-19 02:19:11 UTC
  • mfrom: (38.1.2 bug-1050722)
  • Revision ID: william.grant@canonical.com-20120919021911-n2ch1i6vgvfg0tld
When pruning, look for OOPS references up to now rather than up to prune_until. Otherwise we miss any references created in the last week, probably only finding references within 24 hours of the OOPS occurring.

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
    # The tracker finds all the references for the selected dates.
150
150
    finder = tracker(options)
151
151
    references = finder.find_oops_references(
152
 
        prune_from, prune_until, options.project, options.projectgroup)
 
152
        prune_from, datetime.datetime.now(utc), options.project,
 
153
        options.projectgroup)
153
154
    # Then we can delete the unreferenced oopses.
154
155
    repo.prune_unreferenced(prune_from, prune_until, references)
155
156
    # And finally save the fact we have scanned up to the selected date.