summaryrefslogtreecommitdiffstats
path: root/openstack/common/service.py
diff options
context:
space:
mode:
authorDavanum Srinivas <dims@linux.vnet.ibm.com>2012-11-27 22:11:40 -0500
committerDavanum Srinivas <dims@linux.vnet.ibm.com>2012-11-29 09:57:31 -0500
commit83186053c16d7536f90b4e6b3f95bd16d26bfb8c (patch)
tree474c2219024ef89630bdf6ed05f09e040a520338 /openstack/common/service.py
parent582cb960066a02ae247097c8a96484655429fbe1 (diff)
downloadoslo-83186053c16d7536f90b4e6b3f95bd16d26bfb8c.tar.gz
oslo-83186053c16d7536f90b4e6b3f95bd16d26bfb8c.tar.xz
oslo-83186053c16d7536f90b4e6b3f95bd16d26bfb8c.zip
Use Service thread group for WSGI request handling
- Reuse the pool from thread group in service.Service instead of creating a new green pool - Add ability to control the size of the pool in service.Service - Add a couple of tests for wsgi.Service() to test the size of pool a start/stop as well - Get rid of the wait method by using tg.add_thread - Get rid of pool in wsgi.Service - Added explicit property for host and port Fixes LP #1050379 Change-Id: I40507dc7887fb036ec594bb167cdaa42c278607e
Diffstat (limited to 'openstack/common/service.py')
-rw-r--r--openstack/common/service.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openstack/common/service.py b/openstack/common/service.py
index 3186d56..0df0dec 100644
--- a/openstack/common/service.py
+++ b/openstack/common/service.py
@@ -302,8 +302,8 @@ class ProcessLauncher(object):
class Service(object):
"""Service object for binaries running on hosts."""
- def __init__(self):
- self.tg = threadgroup.ThreadGroup('service')
+ def __init__(self, threads=1000):
+ self.tg = threadgroup.ThreadGroup('service', threads)
def start(self):
pass