deployMatch.py 文件源码

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

项目:astoptool 作者: zouliuyun 项目源码 文件源码
def add_match_to_gw(self):

        @hosts('{}_gw'.format(GAME))
        def _add_match_to_gw():
            gw_db_name = '{}_gw'.format(GAME)
            mk_remote_dir(self.remote_dir)
            with cd(self.remote_dir):
                run('''pandora --dump --opt -R {0} match_server_info >{0}.match_server_info.sql.rb{1}'''.format(gw_db_name, TIME))
            run('''pandora --update {} -e 'INSERT INTO match_server_info (type,match_adress,match_id,match_name) VALUES (1,"{}:8092",{},"{}_match_{}");' '''.format(gw_db_name, self.dns, self.id, GAME, self.id))
            result = run('''pandora {} -e 'SELECT * FROM match_server_info' '''.format(gw_db_name))
            print('?????\n??GW?????match??:\n{}'.format(result))

        execute(_add_match_to_gw)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号