summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r--bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py4
1 files changed, 2 insertions, 2 deletions
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):
14 help = "Schedules and executes build requests as possible. Does not return (interrupt with Ctrl-C)" 14 help = "Schedules and executes build requests as possible. Does not return (interrupt with Ctrl-C)"
15 15
16 16
17 @transaction.commit_on_success 17 @transaction.atomic
18 def _selectBuildEnvironment(self): 18 def _selectBuildEnvironment(self):
19 bec = getBuildEnvironmentController(lock = BuildEnvironment.LOCK_FREE) 19 bec = getBuildEnvironmentController(lock = BuildEnvironment.LOCK_FREE)
20 bec.be.lock = BuildEnvironment.LOCK_LOCK 20 bec.be.lock = BuildEnvironment.LOCK_LOCK
21 bec.be.save() 21 bec.be.save()
22 return bec 22 return bec
23 23
24 @transaction.commit_on_success 24 @transaction.atomic
25 def _selectBuildRequest(self): 25 def _selectBuildRequest(self):
26 br = BuildRequest.objects.filter(state = BuildRequest.REQ_QUEUED).order_by('pk')[0] 26 br = BuildRequest.objects.filter(state = BuildRequest.REQ_QUEUED).order_by('pk')[0]
27 br.state = BuildRequest.REQ_INPROGRESS 27 br.state = BuildRequest.REQ_INPROGRESS