diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2014-11-10 14:51:43 +0100 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2014-11-10 14:51:43 +0100 |
commit | e08bfa5ed89aefeb508b1bbae76bbf2a342f85a1 (patch) | |
tree | 8eba47fc7dd95a77f85841d435be38833d300f96 /service/pixelated | |
parent | 5c9aa9aff7fed5feddc58845c72607caa7feb76c (diff) |
Pass configured port number to reactor.
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/config/app_factory.py | 5 | ||||
-rw-r--r-- | service/pixelated/runserver.py | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/service/pixelated/config/app_factory.py b/service/pixelated/config/app_factory.py index 3dc1c83a..6a9046ee 100644 --- a/service/pixelated/config/app_factory.py +++ b/service/pixelated/config/app_factory.py @@ -131,8 +131,9 @@ def init_app(app): sync_info_controller, attachments_controller) -def create_app(app, bind_address): - reactor.listenTCP(3333, Site(app.resource()), interface=bind_address) +def create_app(app, bind_address, bind_port): + print type(reactor.listenTCP) + reactor.listenTCP(bind_port, Site(app.resource()), interface=bind_address) reactor.callWhenRunning(lambda: init_app(app)) reactor.run() diff --git a/service/pixelated/runserver.py b/service/pixelated/runserver.py index 58ad53e1..518ea5fb 100644 --- a/service/pixelated/runserver.py +++ b/service/pixelated/runserver.py @@ -54,7 +54,7 @@ def setup(): app.config['LEAP_PASSWORD'] = config['password'] else: configuration_setup(args.config) - start_services(args.host) + start_services(args.host, args.port) def register(username, server_name): @@ -113,9 +113,9 @@ def configuration_setup(config_file): app.config['LEAP_PASSWORD'] = password -def start_services(bind_address): +def start_services(bind_address, bind_port): events_server.ensure_server(port=8090) - app_factory.create_app(app, bind_address) + app_factory.create_app(app, bind_address, bind_port) if __name__ == '__main__': |