service.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:synergy-service 作者: openstack 项目源码 文件源码
def main():
    try:
        eventlet.monkey_patch(os=False)

        # the configuration will be into the cfg.CONF global data structure
        config.parseArgs(args=sys.argv[1:],
                         default_config_files=["/etc/synergy/synergy.conf"])

        if not cfg.CONF.config_file:
            sys.exit("ERROR: Unable to find configuration file via the "
                     "default search paths (~/.synergy/, ~/, /etc/synergy/"
                     ", /etc/) and the '--config-file' option!")

        setLogger(name="synergy")
        setLogger(name="oslo.messaging._drivers")

        global LOG

        LOG = logging.getLogger(__name__)
        LOG.info("Starting Synergy...")

        server = Synergy()
        server.start()

        LOG.info("Synergy started")
    except Exception as ex:
        LOG.error("unrecoverable error: %s" % ex)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号