From patchwork Thu Dec 1 03:15:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael-Doyle Hudson X-Patchwork-Id: 5407 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 6630B23E01 for ; Thu, 1 Dec 2011 03:15:20 +0000 (UTC) Received: from mail-lpp01m010-f52.google.com (mail-lpp01m010-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id 3C150A1830B for ; Thu, 1 Dec 2011 03:15:20 +0000 (UTC) Received: by mail-lpp01m010-f52.google.com with SMTP id h2so746102laa.11 for ; Wed, 30 Nov 2011 19:15:20 -0800 (PST) Received: by 10.152.111.170 with SMTP id ij10mr3299536lab.5.1322709320135; Wed, 30 Nov 2011 19:15:20 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.41.198 with SMTP id h6cs44814lal; Wed, 30 Nov 2011 19:15:19 -0800 (PST) Received: by 10.180.88.66 with SMTP id be2mr3402588wib.54.1322709317408; Wed, 30 Nov 2011 19:15:17 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id fx1si1528058wbb.39.2011.11.30.19.15.17 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 30 Nov 2011 19:15:17 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1RVx7F-00034d-4d for ; Thu, 01 Dec 2011 03:15:17 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 15C68E014A for ; Thu, 1 Dec 2011 03:15:17 +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: 100 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-scheduler/trunk] Rev 100: remove scripts, main.py and update the docs a little bit Message-Id: <20111201031517.31205.22725.launchpad@ackee.canonical.com> Date: Thu, 01 Dec 2011 03:15:17 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14414"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: f7bdcc3ad1eefe9c207c4bd4165e3f2a2b08d7e9 ------------------------------------------------------------ revno: 100 committer: Michael Hudson-Doyle branch nick: trunk timestamp: Thu 2011-12-01 16:13:04 +1300 message: remove scripts, main.py and update the docs a little bit removed: lava-scheduler lava-scheduler-monitor lava_scheduler_daemon/main.py modified: setup.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 === removed file 'lava-scheduler' --- lava-scheduler 2011-08-18 02:44:06 +0000 +++ lava-scheduler 1970-01-01 00:00:00 +0000 @@ -1,11 +0,0 @@ -#!/usr/bin/python - -import os - -# The following line is mangled to point at the debian settings file -# at package build time. -os.environ['DJANGO_SETTINGS_MODULE'] = 'lava_server.settings.development' - -from lava_scheduler_daemon.main import daemon_main - -daemon_main() === removed file 'lava-scheduler-monitor' --- lava-scheduler-monitor 2011-08-18 02:44:06 +0000 +++ lava-scheduler-monitor 1970-01-01 00:00:00 +0000 @@ -1,11 +0,0 @@ -#!/usr/bin/python - -import os - -# The following line is mangled to point at the debian settings file -# at package build time. -os.environ['DJANGO_SETTINGS_MODULE'] = 'lava_server.settings.development' - -from lava_scheduler_daemon.main import monitor_main - -monitor_main() === removed file 'lava_scheduler_daemon/main.py' --- lava_scheduler_daemon/main.py 2011-08-18 03:34:27 +0000 +++ lava_scheduler_daemon/main.py 1970-01-01 00:00:00 +0000 @@ -1,61 +0,0 @@ -import logging -import os -import sys - -from twisted.internet import defer, reactor - -from lava_scheduler_daemon.service import BoardSet -from lava_scheduler_daemon.config import get_config - -from lava_scheduler_daemon.dbjobsource import DatabaseJobSource - -def _configure_logging(): - logger = logging.getLogger('') - config = get_config('logging') - level = config.get("logging", "level") - destination = config.get("logging", 'destination', None) - if destination == '-': - handler = logging.StreamHandler(sys.stdout) - else: - handler = logging.FileHandler(destination) - handler.setFormatter( - logging.Formatter("[%(levelname)s] [%(name)s] %(message)s")) - logger.addHandler(handler) - logger.setLevel(getattr(logging, level)) - - -def daemon_main(): - source = DatabaseJobSource() - - if sys.argv[1:] == ['--use-fake']: - dispatcher = os.path.join( - os.path.dirname(os.path.dirname(os.path.abspath(__file__))), - 'fake-dispatcher') - elif sys.argv[1:2] == ['--dispatcher'] and len(sys.argv) == 3: - dispatcher = sys.argv[2] - elif sys.argv[1:]: - print >>sys.stderr, "invalid options %r" % sys.argv[1:] - sys.exit(1) - else: - dispatcher = 'lava-dispatch' - - service = BoardSet(source, dispatcher, reactor) - reactor.callWhenRunning(service.startService) - - _configure_logging() - - reactor.run() - - -def monitor_main(): - import json - from lava_scheduler_daemon.board import Job - source = DatabaseJobSource() - dispatcher, board_name, json_file = sys.argv[1:] - job = Job( - json.load(open(json_file)), dispatcher, source, board_name, reactor) - def run(): - job.run().addCallback(lambda result: reactor.stop()) - reactor.callWhenRunning(run) - _configure_logging() - reactor.run() === modified file 'setup.py' --- setup.py 2011-11-21 01:31:45 +0000 +++ setup.py 2011-12-01 03:13:04 +0000 @@ -32,7 +32,6 @@ [lava_server.extensions] scheduler = lava_scheduler_app.extension:SchedulerExtension """, - scripts=["lava-scheduler", "lava-scheduler-monitor"], install_requires=[ "lava-server >= 0.7.1", "simplejson",