← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~pappacena/launchpad:oci-fill-build-request into launchpad:master

 


Diff comments:

> diff --git a/lib/lp/oci/model/ocirecipe.py b/lib/lp/oci/model/ocirecipe.py
> index c167b15..3448982 100644
> --- a/lib/lp/oci/model/ocirecipe.py
> +++ b/lib/lp/oci/model/ocirecipe.py
> @@ -405,6 +405,15 @@ class OCIRecipe(Storm, WebhookTargetMixin):
>      def getBuildRequest(self, job_id):
>          return OCIRecipeBuildRequest(self, job_id)
>  
> +    def createBuildRequest(self, requester):
> +        """See `IOCIRecipe`."""
> +        self._checkRequestBuild(requester)
> +        job = getUtility(IOCIRecipeRequestBuildsJobSource).create(
> +            self, requester, run_on_commit=False)
> +        job.start()
> +        job.complete()
> +        return self.getBuildRequest(job.job_id)

Any better suggestion on how to create a job without executing it?

> +
>      def requestBuildsFromJob(self, requester, build_request=None):
>          self._checkRequestBuild(requester)
>          distro_arch_series_to_build = set(self.getAllowedArchitectures())


-- 
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/391574
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:oci-fill-build-request into launchpad:master.