[Toaster] [PATCH 08/25] toaster: make runbuilds to loop
Ed Bartosh
ed.bartosh at linux.intel.com
Tue Oct 27 10:28:05 PDT 2015
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.
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
.../lib/toaster/bldcontrol/management/commands/runbuilds.py | 13 ++++++++++---
1 file 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 5243a50..48dc618 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
from bldcontrol.models import BuildRequest, BuildEnvironment, BRError, BRVariable
import os
import logging
+import time
logger = logging.getLogger("ToasterScheduler")
@@ -128,6 +129,12 @@ class Command(NoArgsCommand):
def handle_noargs(self, **options):
- self.cleanup()
- self.archive()
- self.schedule()
+ while True:
+ try:
+ self.cleanup()
+ self.archive()
+ self.schedule()
+ except:
+ pass
+
+ time.sleep(1)
--
2.1.4
More information about the toaster
mailing list