Merge lp:~edwin-grubbs/launchpad/bug-615654-registry-jobqueue-schema into lp:launchpad/db-devel
| Status: | Merged |
|---|---|
| Merged at revision: | 9873 |
| Proposed branch: | lp:~edwin-grubbs/launchpad/bug-615654-registry-jobqueue-schema |
| Merge into: | lp:launchpad/db-devel |
| Diff against target: |
78 lines (+45/-0) 3 files modified
database/schema/comments.sql (+16/-0) database/schema/patch-2208-99-0.sql (+27/-0) database/schema/security.cfg (+2/-0) |
| To merge this branch: | bzr merge lp:~edwin-grubbs/launchpad/bug-615654-registry-jobqueue-schema |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Stuart Bishop | db | 2010-09-16 | Approve on 2010-09-16 |
| Robert Collins | db | 2010-09-16 | Pending |
|
Review via email:
|
|||
Description of the Change
This branch adds the PersonTransferJob and QuestionJob tables.
The PersonTransferJob table will be used immediately to reduce or eliminate timeouts when adding lots of members to a team. In the future, the table will also be used for jobs where two person objects are merged.
The QuestionJob will be used to queue notifications about changes to the question object.
Should these jobs use new database users and have their own cronjobs? It seems like it would be much simpler to have a single cronjob run all the jobs.
| Robert Collins (lifeless) wrote : | # |
| Stuart Bishop (stub) wrote : | # |
I'm happy with the names. These relations have so far often been named by the tables they are joining (BranchJob, ArchiveJob) as with the job_type column, they can be used for several different types of task. Although we are not consistent - ApportJob should be BlobJob for instance.
We want a unique database user per script. If you have one script processing multiple types of jobs, that is one database user.
We will need some indexes in case these tables grow:
CREATE INDEX PersonTransferJ
CREATE INDEX PersonTransferJ
CREATE INDEX QuestionJob_
| Edwin Grubbs (edwin-grubbs) wrote : | # |
Thanks for the review. Is a new user created in the db just by adding an entry to security.cfg, or do I need to do something else?
| Stuart Bishop (stub) wrote : | # |
Just the entry in security.cfg - that takes care of everything at your end.

Quick thoughts:
- for question emails, perhaps a single 'emailjob' would be better, containing in it any email we want to send rather than question specific emails.
- PTJ seems sensible to me, though I thought we'd eliminated timeouts there already; could you link a recent oops for me to peruse (and its bug)? thanks.
- I don't see that we need new db users and cron jobs for this, though we do need one cronjob per queue AIUI today.