From 4250fc34578f7617a07c4e9dda8eb9d5129739c7 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Fri, 8 Mar 2024 10:02:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=9C=E4=B8=AD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=A2=E6=88=B7=E7=AB=AF=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update/utils/client_util.py | 4 +++- update/views.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/update/utils/client_util.py b/update/utils/client_util.py index 968cb46..06eced3 100644 --- a/update/utils/client_util.py +++ b/update/utils/client_util.py @@ -181,6 +181,7 @@ class ClientUtil: db_conn.commit() db_cursor.close() db_conn.close() + return client.upload_name def client_process(self, cinema_ip, short_release): self.smb_connect() @@ -188,8 +189,9 @@ class ClientUtil: self.handle_client_db() self.clear_delete_file() self.get_client(cinema_ip, short_version) - self.upload_client(cinema_ip, short_version) + client_file_name = self.upload_client(cinema_ip, short_version) self.smb_disconnect() + return client_file_name # # class ClientUtil: diff --git a/update/views.py b/update/views.py index 3e4b41b..df67c7f 100644 --- a/update/views.py +++ b/update/views.py @@ -294,9 +294,9 @@ def update_cine(request): redis_conn.set(redis_key, json.dumps(update_status), 5 * 60) client_release = ClientUtil() print('client_release.client_process') - client_release.client_process(cinema_ip, short_release) + client_name = client_release.client_process(cinema_ip, short_release) update_status['client']['result'] = 'success' - update_status['client']['msg'] = '客户端上传成功' + update_status['client']['msg'] = f'客户端上传成功: {client_name}' redis_conn.set(redis_key, json.dumps(update_status), 5 * 60) except Exception as e: print('client', e)