From: Elliot Smith Date: Thu, 10 Dec 2015 03:56:32 +0000 (-0800) Subject: bitbake: toaster: Update API used to make runbuilds methods run in transactions X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f602c1a22ba21cba5372dbf03a1c41d7116f596;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: toaster: Update API used to make runbuilds methods run in transactions runbuilds previously had its methods decorated with transaction.commit_on_success, which is now deprecated. transaction.atomic is an (almost) drop-in replacement for this, so use this instead. [YOCTO #8364] (Bitbake rev: c4804b84eaaef6a81027bae5cf8bfe63d949c293) Signed-off-by: Elliot Smith Signed-off-by: Ed Bartosh Signed-off-by: brian avery Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py index 48dc618bcf9..d40dedb4b0f 100644 --- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py @@ -14,14 +14,14 @@ class Command(NoArgsCommand): help = "Schedules and executes build requests as possible. Does not return (interrupt with Ctrl-C)" - @transaction.commit_on_success + @transaction.atomic def _selectBuildEnvironment(self): bec = getBuildEnvironmentController(lock = BuildEnvironment.LOCK_FREE) bec.be.lock = BuildEnvironment.LOCK_LOCK bec.be.save() return bec - @transaction.commit_on_success + @transaction.atomic def _selectBuildRequest(self): br = BuildRequest.objects.filter(state = BuildRequest.REQ_QUEUED).order_by('pk')[0] br.state = BuildRequest.REQ_INPROGRESS