Merge lp://qastaging/~michael.nelson/launchpad/628711-generate-ppa-htacess-too-slow-try-2 into lp://qastaging/launchpad

Proposed by Michael Nelson
Status: Merged
Approved by: Brad Crittenden
Approved revision: no longer in the source branch.
Merged at revision: 11503
Proposed branch: lp://qastaging/~michael.nelson/launchpad/628711-generate-ppa-htacess-too-slow-try-2
Merge into: lp://qastaging/launchpad
Diff against target: 328 lines (+148/-54)
2 files modified
lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py (+111/-50)
lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py (+37/-4)
To merge this branch: bzr merge lp://qastaging/~michael.nelson/launchpad/628711-generate-ppa-htacess-too-slow-try-2
Reviewer Review Type Date Requested Status
Graham Binns (community) release-critical Approve
Brad Crittenden (community) code Approve
Review via email: mp+34546@code.qastaging.launchpad.net

Commit message

Speed up the generate-ppa-htacess cron script.

Description of the change

= Summary =
This branch addresses bug 628711 - generate-ppa-htaccess is too slow.

== Proposed fix ==
Based on the discussion on the bug, this branch updates the script so that it:

1) Queries for *all* current subscriptions that should be marked as expired
and expires them,
2) Queries for all tokens that are now invalid (ie. based on subscriptions
that have been cancelled or expired) and deactivates them, noting the ppas
affected.
3) Finds all the ppas that have new tokens created since the last successful
run of the script, combines these with the ppas affected by token deactivation
and checks/recreates their htpasswd files.

== Pre-implementation notes ==
See bug 628711

== Implementation details ==

== Tests ==
bin/test -vvm test_generate_ppa_htaccess

== Demo and Q/A ==
I'll be starting the QA on dogfood now.

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py
  lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py

To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :

This change looks good Michael and I'm glad to hear you've run it on dogfood.

review: Approve (code)
Revision history for this message
Graham Binns (gmb) :
review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.