Skip to contentSkip to conversation

bitbake: toaster: make runbuilds to loop

PATCH In review Ed Bartosh 2 participants 2 messages Jan 22, 2016 – Jan 25, 2016

lore
Share & tools
lore

Ed Bartosh

author
#0 lore raw

PATCH 1/1 bitbake: toaster: make runbuilds to loop

From: Ed Bartosh <[email protected]>

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)

---
 .../lib/toaster/bldcontrol/management/commands/runbuilds.py | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +10 -3
index 5243a50..48dc618 100644
@@ -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)
Signature · 12 lines
2.1.4

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
#1 lore raw
Quoted 5 lines · Ed Bartosh

From: Ed Bartosh <[email protected]>

Made runbuilds to loop to avoid having a loop in shell code and initialize heavy Django init machinery every second.

I've sent this to bitbake-devel.

Elliot

Quoted 66 lines

Ignored exceptions to prevent exiting a loop.

(Bitbake rev: e04da15556ca0936de652b8c085e4199e5551457)

---
 .../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

bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +0 -0
@@ -5,6 +5,7 @@ from bldcontrol.bbcontroller import

getBuildEnvironmentController, ShellCmdExcep
from bldcontrol.models import BuildRequest, BuildEnvironment, BRError,
BRVariable
import os
import logging

bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +10 -4
+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

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Signature · 3 lines
Elliot Smith
Software Engineer
Intel Open Source Technology Centre