aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster/bldcontrol/models.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-10-13 17:10:39 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-10-30 13:39:37 +0000
commit7c333350418c4140e6c988c5272940f8057d327d (patch)
treea1ed246a0b719d9b556e2f80b291b145107d4ae9 /lib/toaster/bldcontrol/models.py
parent7d51f895bd56bd18f2258059b377851c2ce82114 (diff)
downloadbitbake-7c333350418c4140e6c988c5272940f8057d327d.tar.gz
toaster: change startup parameter passing to avoid race
We avoid a race between the setting the TOASTER_BRBE variable and reading the variable in toaster ui by supplying the variable at server startup time through the toaster.conf post-read file. Additional small changes are included, including marking the build request with the environment id of where the build took place. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/toaster/bldcontrol/models.py')
-rw-r--r--lib/toaster/bldcontrol/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/toaster/bldcontrol/models.py b/lib/toaster/bldcontrol/models.py
index 4c54a59b1..df3635b33 100644
--- a/lib/toaster/bldcontrol/models.py
+++ b/lib/toaster/bldcontrol/models.py
@@ -59,7 +59,8 @@ class BuildRequest(models.Model):
)
project = models.ForeignKey(Project)
- build = models.ForeignKey(Build, null = True) # TODO: toasterui should set this when Build is created
+ build = models.OneToOneField(Build, null = True) # TODO: toasterui should set this when Build is created
+ environment = models.ForeignKey(BuildEnvironment, null = True)
state = models.IntegerField(choices = REQUEST_STATE, default = REQ_CREATED)
created = models.DateTimeField(auto_now_add = True)
updated = models.DateTimeField(auto_now = True)