Merge lp:~sinzui/launchpad/queue-project-email into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | j.c.sackett on 2012-05-31 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15349 |
| Proposed branch: | lp:~sinzui/launchpad/queue-project-email |
| Merge into: | lp:launchpad |
| Diff against target: | 0 lines |
| To merge this branch: | bzr merge lp:~sinzui/launchpad/queue-project-email |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| j.c.sackett (community) | 2012-05-31 | Approve on 2012-05-31 | |
|
Review via email:
|
|||
Commit Message
Create daily project licensing emails.
Description of the Change
Pre-implementation: abentley, wgrant
Launchpad needs a daily process that queues the jobs to send emails
about expiring commercial licenses.
-------
RULES
* Using daily-builds as a guide
* Create a cronscript that gets each kind of product job source
* It calls each job source to make the needed jobs.
* Maybe the job sources need to be called in a specific order.
QA
* Verify database/
add the commercialsubsc
* Ask a WebOps to run ./cronscripts/
* Verify that the script reports that 14 or more jobs were created.
* Verify that a ThirtyDay... job were created for numerink.
* Verify that an Expired... job were created for sausalito.
* Verify that sausalito is deactivated.
LINT
cronscripts
database/
lib/
lib/
lib/
lib/
TEST
./bin/test -vvc lp.registry.
IMPLEMENTATION
Created a cronscript that calls ProductJobManag
I discovered that I neglected to add the product-job user to the config.
The queries to find expiring products needed access to the
commercialsubsc
cronscripts
database/
lib/
I extracted the create() method from the three commercial job sources to
a base interface and added getExpiringProd
requires that all the commercial jobs to have the same contracts.
lib/
I added the ProductJobManager to orchestra job creation. This will grow
to handle "other/open source" and "other/I don't know" cases in the
future. ProductJobManager does the primary work for the cronscript. I
added getExpiringProd
jobs, then updated each class to provide _get_expiration
returns the set of dates that constrain the search. In the tests I add
CommercialHelpers which is used by old and new tests to ensure the job
classes, the manager, and the cronscript has a common setup to ensure
they operate under the same conditions.
lib/
lib/

Curtis--
This looks good. Thanks.