Author: justi9
Date: 2008-12-05 11:29:49 -0500 (Fri, 05 Dec 2008)
New Revision: 2933
Modified:
mgmt/trunk/mint/bin/mint-bench
mgmt/trunk/mint/python/mint/__init__.py
mgmt/trunk/mint/python/mint/tools.py
Log:
Use a config var to determine whether to start the registration-polling thread.
Modified: mgmt/trunk/mint/bin/mint-bench
===================================================================
--- mgmt/trunk/mint/bin/mint-bench 2008-12-05 15:05:52 UTC (rev 2932)
+++ mgmt/trunk/mint/bin/mint-bench 2008-12-05 16:29:49 UTC (rev 2933)
@@ -9,10 +9,10 @@
def main():
root = logging.getLogger("mint")
- root.setLevel(logging.INFO)
+ root.setLevel(logging.WARN)
h = logging.StreamHandler()
- h.setLevel(logging.INFO)
+ h.setLevel(logging.WARN)
root.addHandler(h)
if "--profile" in sys.argv:
Modified: mgmt/trunk/mint/python/mint/__init__.py
===================================================================
--- mgmt/trunk/mint/python/mint/__init__.py 2008-12-05 15:05:52 UTC (rev 2932)
+++ mgmt/trunk/mint/python/mint/__init__.py 2008-12-05 16:29:49 UTC (rev 2933)
@@ -324,7 +324,7 @@
self.dataUri = dataUri
self.debug = debug
self.updateObjects = True
- self.pollRegistrations = False # XXX
+ self.pollRegistrations = True
assert MintModel.staticInstance is None
MintModel.staticInstance = self
@@ -376,13 +376,17 @@
def start(self):
self.updateThread.start()
self.dbExpireThread.start()
- self.registrationThread.start()
+ if self.pollRegistrations:
+ self.registrationThread.start()
+
def stop(self):
self.updateThread.stop()
self.dbExpireThread.stop()
- self.registrationThread.stop()
+ if self.pollRegistrations:
+ self.registrationThread.stop()
+
def callMethod(self, brokerId, objId, classKey, methodName, callback, args):
self.lock()
try:
Modified: mgmt/trunk/mint/python/mint/tools.py
===================================================================
--- mgmt/trunk/mint/python/mint/tools.py 2008-12-05 15:05:52 UTC (rev 2932)
+++ mgmt/trunk/mint/python/mint/tools.py 2008-12-05 16:29:49 UTC (rev 2933)
@@ -113,6 +113,7 @@
int(opts.get("expire-frequency", freqDefault)),
int(opts.get("expire-threshold", thresholdDefault)),
debug=True)
+ model.pollRegistrations = False
model.check()
model.init()
Show replies by date