Code review comment for lp:~abentley/launchpad/run-via-celery

Revision history for this message
Abel Deuring (adeuring) wrote :

Overall, a very nice branch.

As discused on IRC, calling CeleryRunJob.delay(BrachScanJob.create(...)) creates a race condition.

Another remark:

> === modified file 'lib/lp/code/model/branch.py'
> --- lib/lp/code/model/branch.py 2012-03-21 12:34:12 +0000
> +++ lib/lp/code/model/branch.py 2012-03-27 14:40:29 +0000
> @@ -1032,7 +1032,8 @@
> return getUtility(IBranchLookup).getByUniqueName(location)
>
> def branchChanged(self, stacked_on_url, last_revision_id,
> - control_format, branch_format, repository_format):
> + control_format, branch_format, repository_format,
> + skip_celery=False):

This changes needs a related change in the interface class. I think
that the new parameter deserves a short explanation: As I understand it,
skip_celery should be False only in tests.

review: Needs Fixing

« Back to merge proposal