From patchwork Tue Sep 3 11:05:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Williams X-Patchwork-Id: 19704 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f70.google.com (mail-vb0-f70.google.com [209.85.212.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 26BB225DFC for ; Tue, 3 Sep 2013 11:05:44 +0000 (UTC) Received: by mail-vb0-f70.google.com with SMTP id h10sf6236121vbh.9 for ; Tue, 03 Sep 2013 04:05:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:to:from:subject :message-id:date:reply-to:sender:errors-to:precedence :x-original-sender:x-original-authentication-results:mailing-list :list-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=LxOEZZGNoI5TEYInqzYYvrMhoTPdZjRwtsjk6PvtBvI=; b=dORcneECB/DTrA3zKE680/i+hZzAldViCo7iFq4Xbzqct/5NdgdZ5bhD018zlfThTv uvJzpiEPcYtBVCt+7/ZtVPYdnSOp0FAw5mA1+mFhUxp3fbXP1p1V6awl3HAjUdNn4OJC YwR4EkNQ+9KUnincJ4poxUcPFsvFMtNiEAuRfVw776hcYGPeE6bj7KCHWrVU8FjxnYWK lXaAeRrT7jfNV/AM23fzM9iLcbKrW72M2UKUDqSz7vBgtgPWCijnpGUI7YNAWTqEOY4V ewy0icYLkmIjUcnuZzIXrgWAoqmnU8P8dPRJGUPC2z7SJg6AKN57TDdSy2XM5982KuuT T4WQ== X-Received: by 10.236.140.130 with SMTP id e2mr9914713yhj.10.1378206343712; Tue, 03 Sep 2013 04:05:43 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.121.231 with SMTP id ln7ls1574861qeb.57.gmail; Tue, 03 Sep 2013 04:05:43 -0700 (PDT) X-Received: by 10.220.74.69 with SMTP id t5mr28162953vcj.18.1378206343625; Tue, 03 Sep 2013 04:05:43 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id uw3si4277788vec.58.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Sep 2013 04:05:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id oz10so3971550veb.3 for ; Tue, 03 Sep 2013 04:05:43 -0700 (PDT) X-Gm-Message-State: ALoCoQlGhJcRt4+WQUsjQaFW0YhWUn9k6E6KYwMpGpfJV7hNm0/GjJB5Bt4eEZmYd5hjDDtGWbhL X-Received: by 10.58.217.167 with SMTP id oz7mr27950948vec.15.1378206343481; Tue, 03 Sep 2013 04:05:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp164463vcz; Tue, 3 Sep 2013 04:05:42 -0700 (PDT) X-Received: by 10.194.21.131 with SMTP id v3mr1709891wje.44.1378206341851; Tue, 03 Sep 2013 04:05:41 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id hm6si6725922wjc.32.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Sep 2013 04:05:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1VGoQX-00068P-AH for ; Tue, 03 Sep 2013 11:05:41 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 3CD22E0A37 for ; Tue, 3 Sep 2013 11:05:41 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-scheduler X-Launchpad-Branch: ~linaro-validation/lava-scheduler/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 256 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-scheduler/trunk] Rev 256: Senthil Kumaran 2013-08-31 Restore an if condition to avoid NoneType Message-Id: <20130903110541.17878.95337.launchpad@ackee.canonical.com> Date: Tue, 03 Sep 2013 11:05:41 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16753"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 55303f02fb837ffb90ab58c031c6b7efec2d88f9 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: noreply@launchpad.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Merge authors: Senthil Kumaran S (stylesen) Related merge proposals: https://code.launchpad.net/~stylesen/lava-scheduler/fix-worker-multinode-error/+merge/183301 proposed by: Senthil Kumaran S (stylesen) review: Approve - Neil Williams (codehelp) ------------------------------------------------------------ revno: 256 [merge] committer: Neil Williams branch nick: lava-scheduler timestamp: Tue 2013-09-03 12:01:40 +0100 message: Senthil Kumaran 2013-08-31 Restore an if condition to avoid NoneType objects for jobs. Senthil Kumaran 2013-08-30 Fix scheduling jobs across multiple workers setup. modified: lava_scheduler_daemon/service.py --- lp:lava-scheduler https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk You are subscribed to branch lp:lava-scheduler. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk/+edit-subscription === modified file 'lava_scheduler_daemon/service.py' --- lava_scheduler_daemon/service.py 2013-08-28 13:13:46 +0000 +++ lava_scheduler_daemon/service.py 2013-08-30 18:07:18 +0000 @@ -17,6 +17,7 @@ # along with LAVA Scheduler. If not, see . import logging +import lava_dispatcher.config as dispatcher_config from twisted.application.service import Service from twisted.internet import defer @@ -42,11 +43,16 @@ self._cbCheckJobs).addErrback(catchall_errback(self.logger)) def _cbCheckJobs(self, job_list): + configured_boards = [ + x.hostname for x in dispatcher_config.get_devices()] + for job in job_list: - new_job = JobRunner(self.source, job, self.dispatcher, - self.reactor, self.daemon_options) - self.logger.info("Starting Job: %d " % job.id) - new_job.start() + if job.actual_device.hostname in configured_boards: + new_job = JobRunner(self.source, job, self.dispatcher, + self.reactor, self.daemon_options) + self.logger.info("Starting Job: %d " % job.id) + + new_job.start() def startService(self): self._check_job_call.start(20)