def main():
"""
The entry point for the Accounts service.
This will load the configuration files and start a Tornado webservice
with one or more sub processes.
NOTES:
tornado.options.parse_command_line(final=True)
Allows you to run the service with custom options.
Examples:
Change the logging level to debug:
+ python accounts --logging=DEBUG
+ python accounts --logging=debug
Configure custom syslog server:
+ python accounts --syslog_host=54.77.151.169
"""
koi.load_config(CONF_DIR)
app = koi.make_application(
__version__,
options.service_type,
APPLICATION_URLS)
configure_logging()
server = koi.make_server(app)
# Forks multiple sub-processes, one for each core
server.start(int(options.processes))
prepare_config(options)
IOLoop.instance().start()
评论列表
文章目录