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)
评论列表
文章目录