Comment 3 for bug 628711

Revision history for this message
Michael Nelson (michael.nelson) wrote : Re: [Bug 628711] [NEW] generate-ppa-htaccess is too slow

On Thu, Sep 2, 2010 at 10:17 PM, Robert Collins
<email address hidden> wrote:
> Is there any reason this can't be:
>  - query expired subscriptions; deactivate

That is possible (and I think would be easy)

>  - query invalid tokens; deactive

This *may* be possible. I can see how we could do one query per PPA,
and that should generalise for all PPAs. I'll look into it.

>  - output new htaccess files for affected ppas

That will ensure that people who no longer have valid tokens can no
longer access the PPAs, but it won't help us update those passwd files
where there are new tokens. AFAICS, the only way currently to know we
have a token that is not yet in the passwd file is to check the passwd
file.

That said, we could narrow down the number of ppas we update using the
tokens.date_created timestamp (ie. by default only add ppas with new
tokens created in the last 5 minutes - or double the cron time etc.,
as a parameter - to the affected ppas)

>  - commit-and-done?
>
> The incremental work at any point should be pretty small right, if we
> are running this every (say) minute.

Sounds good - thanks for the pointers Robert.