summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/CherryPyCore.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-10-10 08:14:37 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-10-10 12:10:10 -0400
commit1af7e98c1afeeeb40747688fc5f393f98062f6a3 (patch)
treefadf539ccf87c4b12e6d4f19a13681fcb383190e /src/lib/Bcfg2/Server/CherryPyCore.py
parent2f7b00a52b304a1db7fbfdfceafbd45217e29e9a (diff)
downloadbcfg2-1af7e98c1afeeeb40747688fc5f393f98062f6a3.tar.gz
bcfg2-1af7e98c1afeeeb40747688fc5f393f98062f6a3.tar.bz2
bcfg2-1af7e98c1afeeeb40747688fc5f393f98062f6a3.zip
added module-level Bcfg2.Statistics object for easier tracking
Diffstat (limited to 'src/lib/Bcfg2/Server/CherryPyCore.py')
-rw-r--r--src/lib/Bcfg2/Server/CherryPyCore.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/CherryPyCore.py b/src/lib/Bcfg2/Server/CherryPyCore.py
index 79e939344..53f3de018 100644
--- a/src/lib/Bcfg2/Server/CherryPyCore.py
+++ b/src/lib/Bcfg2/Server/CherryPyCore.py
@@ -2,6 +2,7 @@
import sys
import time
+import Bcfg2.Statistics
from Bcfg2.Compat import urlparse, xmlrpclib, b64decode
from Bcfg2.Server.Core import BaseCore
import cherrypy
@@ -84,7 +85,8 @@ class Core(BaseCore):
try:
body = handler(*rpcparams, **params)
finally:
- self.stats.add_value(rpcmethod, time.time() - method_start)
+ Bcfg2.Statistics.stats.add_value(rpcmethod,
+ time.time() - method_start)
xmlrpcutil.respond(body, 'utf-8', True)
return cherrypy.serving.response.body
@@ -112,6 +114,7 @@ class Core(BaseCore):
cherrypy.config.update(config)
cherrypy.tree.mount(self, '/', {'/': self.setup})
cherrypy.engine.start()
+ return True
def _block(self):
cherrypy.engine.block()