diff mbox

[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
State Accepted
Headers show

Commit Message

Michael-Doyle Hudson Dec. 1, 2011, 3:15 a.m. UTC
------------------------------------------------------------
revno: 100
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
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
diff mbox

Patch

=== 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",