changed variables to use proper naming conventions

This commit is contained in:
Jeremy Johnson 2013-08-17 10:42:54 +08:00
parent deab81483e
commit d6de1ea5c4

View file

@ -16,12 +16,12 @@ from cherrypy import wsgiserver
from django.core.handlers.wsgi import WSGIHandler
def run_app(host, port, threadCount):
def run_app(host, port, thread_count):
server = wsgiserver.CherryPyWSGIServer(
(host, port),
WSGIHandler(),
server_name='tornado-pyvows',
numthreads = threadCount
numthreads = thread_count
)
my_thread = current_thread()
@ -35,11 +35,11 @@ def run_app(host, port, threadCount):
class DjangoServer(object):
def __init__(self, host, port):
self.host = host
self.host = host
self.port = port
def start(self, settings, threadCount=1):
self.thr = Thread(target=run_app, args=(self.host, self.port, threadCount))
def start(self, settings, thread_count=1):
self.thr = Thread(target= run_app, args=(self.host, self.port, thread_count))
self.thr.daemon = True
self.thr.settings = {}
for k, v in settings.iteritems():