diff options
author | jamesren <jamesren@592f7852-d20e-0410-864c-8624ca9c26a4> | 2010-02-19 00:12:54 +0000 |
---|---|---|
committer | jamesren <jamesren@592f7852-d20e-0410-864c-8624ca9c26a4> | 2010-02-19 00:12:54 +0000 |
commit | 3c636b08aa22b992fd143fb494b7c7563d2d333d (patch) | |
tree | 901c178b4cdab60e8e7b4a84e22d061f1ca604d7 /scheduler/status_server.py | |
parent | c4c3f3a5585a490ca98b7427be6db8fb4a6327ac (diff) |
Refactor scheduler models into a separate module, scheduler_models. This module doesn't depend on monitor_db, only the other way around. The separation and isolation of dependencies should help us organize the scheduler code a bit better.
This was made possible largely by the many changes we made late last year to improve statelessness of the scheduler. It was motivated here by my work on pluggable metahost handlers, which will need to depend on scheduler models. Without this separation, we'd end up with circular dependencies.
Also includes some fixes for metahost schedulers.
Signed-off-by: Steve Howard <showard@google.com>
Property changes on: scheduler/scheduler_models.py
git-svn-id: svn://test.kernel.org/autotest/trunk@4252 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'scheduler/status_server.py')
-rw-r--r-- | scheduler/status_server.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scheduler/status_server.py b/scheduler/status_server.py index a35ed6b9..29d23db1 100644 --- a/scheduler/status_server.py +++ b/scheduler/status_server.py @@ -1,6 +1,6 @@ import os, BaseHTTPServer, cgi, threading, urllib, fcntl, logging import common -from autotest_lib.scheduler import scheduler_config +from autotest_lib.scheduler import drone_manager, scheduler_config _PORT = 13467 @@ -90,13 +90,13 @@ class StatusServerRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): class StatusServer(BaseHTTPServer.HTTPServer): - def __init__(self, drone_manager): + def __init__(self): address = ('', _PORT) # HTTPServer is an old-style class :( BaseHTTPServer.HTTPServer.__init__(self, address, StatusServerRequestHandler) self._shutting_down = False - self._drone_manager = drone_manager + self._drone_manager = drone_manager.instance() # ensure the listening socket is not inherited by child processes old_flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD) |