Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 562D8E009C3; Fri, 22 Jan 2016 06:46:14 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id E3E7CE00928 for ; Fri, 22 Jan 2016 06:46:08 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 22 Jan 2016 06:46:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,331,1449561600"; d="scan'208";a="896124117" Received: from linux.intel.com ([10.23.219.25]) by orsmga002.jf.intel.com with ESMTP; 22 Jan 2016 06:46:07 -0800 Received: from vmed.fi.intel.com (vmed.fi.intel.com [10.237.72.51]) by linux.intel.com (Postfix) with ESMTP id 0FBCE6A4002; Fri, 22 Jan 2016 07:34:01 -0800 (PST) From: Ed Bartosh To: toaster@yoctoproject.org Date: Fri, 22 Jan 2016 14:36:26 +0200 Message-Id: <1453466186-28912-1-git-send-email-eduard.bartosh@intel.com> X-Mailer: git-send-email 2.1.4 Cc: Ed Bartosh Subject: [review-request][jethro][PATCH] bitbake: toaster: make runbuilds to loop X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2016 14:46:14 -0000 From: Ed Bartosh 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 Signed-off-by: brian avery Signed-off-by: Richard Purdie Signed-off-by: Ed Bartosh --- .../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 --------------------------------------------------------------------- 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.