From 0f602c1a22ba21cba5372dbf03a1c41d7116f596 Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Wed, 9 Dec 2015 19:56:32 -0800 Subject: 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 --- bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py') diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py index 48dc618bcf..d40dedb4b0 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 -- cgit v1.2.3-54-g00ecf