From c1f572df05ea5ecb21b1b9d5b496b83b3257195a Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Thu, 9 Nov 2023 13:53:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=80=90=E8=B4=A6=E5=8F=B7=E5=A4=87?= =?UTF-8?q?=E4=BB=BD=E3=80=91=E5=88=9B=E5=BB=BA=E8=B4=A6=E5=8F=B7=E5=A4=87?= =?UTF-8?q?=E4=BB=BD=E5=AD=98=E5=82=A8=EF=BC=8C=E9=80=89=E6=8B=A9SFTP?= =?UTF-8?q?=EF=BC=8C=E5=8F=91=E9=80=81=E6=9C=8D=E5=8A=A1=E5=99=A8=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E3=80=82=E4=BF=AE=E6=94=B9=E6=89=A7=E8=A1=8C=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E7=9A=84=E6=97=A5=E5=BF=97=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/accounts/automations/backup_account/handlers.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/accounts/automations/backup_account/handlers.py b/apps/accounts/automations/backup_account/handlers.py index f4fffca8d..f4aa2c27a 100644 --- a/apps/accounts/automations/backup_account/handlers.py +++ b/apps/accounts/automations/backup_account/handlers.py @@ -178,7 +178,7 @@ class AccountBackupHandler: recipients = ReplayStorage.objects.filter(id__in=list(recipients)) print( '\n' - '\033[32m>>> 发送备份文件到sftp服务器\033[0m' + '\033[31m>>> 发送备份文件到sftp服务器\033[0m' '' ) plan_name = self.plan_name @@ -204,7 +204,7 @@ class AccountBackupHandler: @staticmethod def step_finished(is_success): if is_success: - print('任务执行成功') + print('任务执行完成') else: print('任务执行失败') @@ -238,9 +238,10 @@ class AccountBackupHandler: if not obj_recipients_part_one and not obj_recipients_part_two: print( '\n' - '\033[32m>>> 该备份任务未分配sftp服务器\033[0m' + '\033[31m>>> 该备份任务未分配sftp服务器\033[0m' '' ) + return if obj_recipients_part_one and obj_recipients_part_two: files = self.create_excel(section='front') self.send_backup_obj_storage(files, obj_recipients_part_one, zip_encrypt_password) @@ -258,9 +259,10 @@ class AccountBackupHandler: if not recipients_part_one and not recipients_part_two: print( '\n' - '\033[32m>>> 该备份任务未分配收件人\033[0m' + '\033[31m>>> 该备份任务未分配收件人\033[0m' '' ) + return if recipients_part_one and recipients_part_two: files = self.create_excel(section='front') self.send_backup_mail(files, recipients_part_one)