diff --git a/update/utils/db_compare.py b/update/utils/db_compare.py index cf8337b..13a5426 100644 --- a/update/utils/db_compare.py +++ b/update/utils/db_compare.py @@ -1,7 +1,6 @@ import os import subprocess import pymysql -from update.utils.git_util import GitUtil from dingxin_toolbox_drf.settings import BASE_DIR, CONFIG from update.utils.git_util import GitUtil from env import ENV @@ -14,7 +13,7 @@ class DbCompare: self.target_pwd = 'cine123456' self.target_port = '3306' self.target_release = short_release - self.cine_sql_path = os.path.join(BASE_DIR, 'dx', 'sql', GitUtil(short_release).get_db_name() + '.sql') + self.cine_sql_path = os.path.join(BASE_DIR, 'dx', 'sql', GitUtil(short_release, target_ip).get_db_name() + '.sql') self.diff_sql_path = os.path.join(BASE_DIR, 'dx', 'temp', self.target_server + '_diff.sql') self.clear_diff_sql_path = os.path.join(BASE_DIR, 'dx', 'temp', self.target_server + '_diff_clear.sql') self.create_sql_path = os.path.join(BASE_DIR, 'dx', 'temp', self.target_server + '_create.sql') diff --git a/update/views.py b/update/views.py index d6ceb48..54d0e98 100644 --- a/update/views.py +++ b/update/views.py @@ -196,7 +196,7 @@ def update_cine(request): try: update_status['git']['result'] = 'running' redis_conn.set(redis_key, json.dumps(update_status), 5 * 60) - git_util = GitUtil(short_release) + git_util = GitUtil(short_release, cinema_ip) git_output = git_util.handle_create_cine() update_status['git']['result'] = 'success' update_status['git']['msg'] = git_output