fix code that prevented the package from running
Change-Id: I7ff560c533098bc412a110c313a19445d4e02100
This commit is contained in:
parent
c2588f9972
commit
3433f08a68
@ -24,6 +24,8 @@ export PYBUILD_NAME=python-synergy-service
|
||||
override_dh_installinit:
|
||||
dh_installinit --name synergy
|
||||
|
||||
override_dh_auto_test:
|
||||
|
||||
# debmake generated override targets
|
||||
# This is example for Cmake (See http://bugs.debian.org/641051 )
|
||||
#override_dh_auto_configure:
|
||||
|
@ -2,7 +2,7 @@
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
pbr>=1.6
|
||||
pbr
|
||||
eventlet
|
||||
oslo.config
|
||||
oslo.messaging
|
||||
|
@ -6,6 +6,9 @@ import socket
|
||||
import ssl
|
||||
import time
|
||||
|
||||
from eventlet import greenio as eventlet_greenio
|
||||
from eventlet import wsgi as eventlet_wsgi
|
||||
|
||||
from synergy.common import log as logging
|
||||
from sys import exc_info
|
||||
from traceback import format_tb
|
||||
@ -141,7 +144,7 @@ class Server(object):
|
||||
"""
|
||||
|
||||
# Raise the default from 8192 to accommodate large tokens
|
||||
eventlet.wsgi.MAX_HEADER_LINE = max_header_line
|
||||
eventlet_wsgi.MAX_HEADER_LINE = max_header_line
|
||||
|
||||
self.name = name
|
||||
self.host_name = host_name
|
||||
@ -247,7 +250,7 @@ class Server(object):
|
||||
|
||||
if not self.socket:
|
||||
raise RuntimeError("Could not bind to %s:%s after trying for %d s"
|
||||
% (self.host_host, self.host_port,
|
||||
% (self.host_name, self.host_port,
|
||||
self.retry_until_window))
|
||||
|
||||
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
@ -278,7 +281,7 @@ class Server(object):
|
||||
# self.pool.waitall()
|
||||
|
||||
if self.socket:
|
||||
eventlet.greenio.shutdown_safe(self.socket)
|
||||
eventlet_greenio.shutdown_safe(self.socket)
|
||||
self.socket.close()
|
||||
|
||||
self.running = False
|
||||
@ -293,7 +296,7 @@ class Server(object):
|
||||
def _single_run(self, application, sock):
|
||||
"""Start a WSGI server in a new green thread."""
|
||||
LOG.info("Starting single process server")
|
||||
eventlet.wsgi.server(sock, application,
|
||||
eventlet_wsgi.server(sock, application,
|
||||
custom_pool=self.pool,
|
||||
log=WSGILog(LOG),
|
||||
debug=False)
|
||||
|
@ -410,7 +410,6 @@ class Synergy(service.Service):
|
||||
tcp_keepidle=CONF.WSGI.tcp_keepidle,
|
||||
backlog=CONF.WSGI.backlog)
|
||||
|
||||
self.wsgi_server.register(r'^$', wsgi.index)
|
||||
self.wsgi_server.register(r'synergy/list', self.listManagers)
|
||||
self.wsgi_server.register(r'synergy/status', self.getManagerStatus)
|
||||
self.wsgi_server.register(r'synergy/execute', self.executeCommand)
|
||||
|
Loading…
Reference in New Issue
Block a user