From dfda6b1e08bf9870216a73be009c2592a16f2e94 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Tue, 9 Sep 2025 15:44:53 +0800 Subject: [PATCH] perf: Change secret del over report --- .../automations/change_secret/manager.py | 6 +--- .../accounts/change_secret_failed_info.html | 36 ------------------- 2 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 apps/accounts/templates/accounts/change_secret_failed_info.html diff --git a/apps/accounts/automations/change_secret/manager.py b/apps/accounts/automations/change_secret/manager.py index ab54a3fa5..a94cf9fc2 100644 --- a/apps/accounts/automations/change_secret/manager.py +++ b/apps/accounts/automations/change_secret/manager.py @@ -9,7 +9,7 @@ from accounts.const import ( AutomationTypes, SecretStrategy, ChangeSecretRecordStatusChoice ) from accounts.models import ChangeSecretRecord -from accounts.notifications import ChangeSecretExecutionTaskMsg, ChangeSecretReportMsg +from accounts.notifications import ChangeSecretExecutionTaskMsg from accounts.serializers import ChangeSecretRecordBackUpSerializer from common.utils import get_logger from common.utils.file import encrypt_and_compress_zip_file @@ -94,10 +94,6 @@ class ChangeSecretManager(BaseChangeSecretPushManager): if not recipients: return - context = self.get_report_context() - for user in recipients: - ChangeSecretReportMsg(user, context).publish() - if not records: return diff --git a/apps/accounts/templates/accounts/change_secret_failed_info.html b/apps/accounts/templates/accounts/change_secret_failed_info.html deleted file mode 100644 index 442ef44b4..000000000 --- a/apps/accounts/templates/accounts/change_secret_failed_info.html +++ /dev/null @@ -1,36 +0,0 @@ -{% load i18n %} - -

{% trans 'Task name' %}: {{ name }}

-

{% trans 'Task execution id' %}: {{ execution_id }}

-

{% trans 'Respectful' %} {{ recipient }}

-

{% trans 'Hello! The following is the failure of changing the password of your assets or pushing the account. Please check and handle it in time.' %}

- - - - - - - - - - - {% for asset_name, account_username, error in asset_account_errors %} - - - - - - {% endfor %} - -
{% trans 'Asset' %}{% trans 'Account' %}{% trans 'Error' %}
{{ asset_name }}{{ account_username }} -
- {{ error }} -
-
\ No newline at end of file