[bitbake-devel] [PATCH] bitbake: toaster: make runbuilds loop

Smith, Elliot elliot.smith at intel.com
Mon Jan 25 14:20:51 UTC 2016


Apologies, I sent this prematurely, and it's a patch for jethro.

Please ignore.

Elliot

On 25 January 2016 at 14:18, Elliot Smith <elliot.smith at intel.com> wrote:

> From: Ed Bartosh <ed.bartosh at linux.intel.com>
>
> This avoids having a loop in shell code and initializing
> heavy Django init machinery every second.
>
> Ignore exceptions to prevent exiting the loop.
>
> (Bitbake rev: e04da15556ca0936de652b8c085e4199e5551457)
>
> Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
> Signed-off-by: brian avery <avery.brian at gmail.com>
> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> Signed-off-by: Ed Bartosh <eduard.bartosh at intel.com>
> Signed-off-by: Elliot Smith <elliot.smith at 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)
> --
> 1.9.3
>
> ---------------------------------------------------------------------
> Intel Corporation (UK) Limited
> Registered No. 1134945 (England)
> Registered Office: Pipers Way, Swindon SN3 1RJ
> VAT No: 860 2173 47
>
> 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.
>
>


-- 
Elliot Smith
Software Engineer
Intel Open Source Technology Centre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20160125/56e188d7/attachment-0002.html>


More information about the bitbake-devel mailing list