Skip to content
Snippets Groups Projects
Commit 674b0aca authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

SW-699: adapted cmdline options

parent db8a9158
No related branches found
No related tags found
No related merge requests found
...@@ -345,15 +345,15 @@ def main(): ...@@ -345,15 +345,15 @@ def main():
parser = OptionParser('%prog [options]', parser = OptionParser('%prog [options]',
description = 'run the ingest web server') description = 'run the ingest web server')
parser.add_option('-p', '--port', dest = 'port', type = 'int', default = 9632, help = 'port number on which to host the webserver, default: %default') parser.add_option('-p', '--port', dest = 'port', type = 'int', default = 9632, help = 'port number on which to host the webserver, default: %default')
parser.add_option('-q', '--broker', dest = 'broker', type = 'string', default = DEFAULT_BROKER, help = 'Address of the qpid broker, default: %default') parser.add_option('-b', '--broker', dest = 'broker', type = 'string', default = DEFAULT_BROKER, help = 'Address of the broker, default: %default')
parser.add_option('-b', '--busname', dest = 'busname', type = 'string', default = DEFAULT_BUSNAME, help = 'Name of the bus exchange on the qpid broker, default: %s' % DEFAULT_BUSNAME) parser.add_option('-e', '--exchange', dest = 'exchange', type = 'string', default = DEFAULT_BUSNAME, help = 'Name of the bus exchange on the broker, default: %s' % DEFAULT_BUSNAME)
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
logging.basicConfig(format = '%(asctime)s %(levelname)s %(message)s', logging.basicConfig(format = '%(asctime)s %(levelname)s %(message)s',
level = logging.INFO) level = logging.INFO)
global ingestrpc global ingestrpc
ingestrpc = IngestRPC(busname = options.busname, broker = options.broker) ingestrpc = IngestRPC(busname = options.exchange, broker = options.broker)
with ingestrpc: with ingestrpc:
app.run(debug = isDevelopmentEnvironment(), threaded = True, host = '0.0.0.0', port = options.port) app.run(debug = isDevelopmentEnvironment(), threaded = True, host = '0.0.0.0', port = options.port)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment