diff --git a/update/utils/client_util_custom.py b/update/utils/client_util_custom.py index 055be26..575d8dd 100644 --- a/update/utils/client_util_custom.py +++ b/update/utils/client_util_custom.py @@ -34,6 +34,8 @@ class ClientUtilCustom: self.smb_conn.close() def sync_client_db(self): + # 尝试修复数据 + self.fix_data() # 获取本地数据库最大的同步ID self.deploy_id = ClientRelease.objects.all().aggregate(Max('deploy_id'))['deploy_id__max'] print('deploy_id', self.deploy_id) @@ -74,7 +76,6 @@ class ClientUtilCustom: local_file.close() # 关闭smb服务 self.smb_disconnect() - self.fix_data() return True def fix_data(self): @@ -87,7 +88,6 @@ class ClientUtilCustom: client.file_name = client.origin_name client.save() - def handle_client_data_format(self, client_data_list): print('handle_client_data_format') for data in client_data_list: @@ -173,7 +173,7 @@ class ClientUtilCustom: release_ver = server_release[8:11] if server_release.startswith('2') else server_release[7:10] if client_ver is None or client_ver == '': - print('1'*100) + print('1' * 100) client = ClientRelease.objects.filter(Q(ver_id=release_ver) & Q(is_cached=True)).order_by('-id').first() else: print('2' * 100) @@ -200,4 +200,4 @@ class ClientUtilCustom: db_conn.commit() db_cursor.close() db_conn.close() - return client.origin_name \ No newline at end of file + return client.origin_name