diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-12-02 10:02:40 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-07 17:37:08 +0000 |
commit | 28e8ccf437fa183fd34fe03ae337fb290e639617 (patch) | |
tree | 0bec4ec8dab48d37d2a036a682243197a1714d9b /bitbake/lib/toaster/bldcontrol/management/commands | |
parent | a3871a37deafd0c2d2e563f36e0d570559483cd8 (diff) | |
download | poky-28e8ccf437fa183fd34fe03ae337fb290e639617.tar.gz |
bitbake: toaster: make runbuilds to loop
Made runbuilds to loop to avoid having a loop in shell code and
initialize heavy Django init machinery every second.
Ignored exceptions to prevent exiting a loop.
(Bitbake rev: e04da15556ca0936de652b8c085e4199e5551457)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/management/commands')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py index 5243a50f9b..48dc618bcf 100644 --- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | |||
@@ -5,6 +5,7 @@ from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdExcep | |||
5 | from bldcontrol.models import BuildRequest, BuildEnvironment, BRError, BRVariable | 5 | from bldcontrol.models import BuildRequest, BuildEnvironment, BRError, BRVariable |
6 | import os | 6 | import os |
7 | import logging | 7 | import logging |
8 | import time | ||
8 | 9 | ||
9 | logger = logging.getLogger("ToasterScheduler") | 10 | logger = logging.getLogger("ToasterScheduler") |
10 | 11 | ||
@@ -128,6 +129,12 @@ class Command(NoArgsCommand): | |||
128 | 129 | ||
129 | 130 | ||
130 | def handle_noargs(self, **options): | 131 | def handle_noargs(self, **options): |
131 | self.cleanup() | 132 | while True: |
132 | self.archive() | 133 | try: |
133 | self.schedule() | 134 | self.cleanup() |
135 | self.archive() | ||
136 | self.schedule() | ||
137 | except: | ||
138 | pass | ||
139 | |||
140 | time.sleep(1) | ||