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)