diff --git a/apps/accounts/api/automations/check_account.py b/apps/accounts/api/automations/check_account.py index 5ce21a4bf..69985e617 100644 --- a/apps/accounts/api/automations/check_account.py +++ b/apps/accounts/api/automations/check_account.py @@ -97,20 +97,6 @@ class AccountRiskViewSet(OrgBulkModelViewSet): data = {'message': 'Success'} return Response(data) - # 处理风险 - - def handle_add_account(self): - pass - - def handle_disable_remote(self): - pass - - def handle_delete_remote(self): - pass - - def handle_delete_both(self): - pass - class CheckAccountEngineViewSet(JMSModelViewSet): search_fields = ('name',) diff --git a/apps/accounts/automations/change_secret/manager.py b/apps/accounts/automations/change_secret/manager.py index 9d624e4f9..159128163 100644 --- a/apps/accounts/automations/change_secret/manager.py +++ b/apps/accounts/automations/change_secret/manager.py @@ -196,7 +196,7 @@ class ChangeSecretManager(AccountBasePlaybookManager): except Exception as e: print(f"\033[31m Save {host} recorder error: {e} \033[0m\n") - def on_runner_failed(self, runner, e): + def on_runner_failed(self, runner, e, **kwargs): logger.error("Account error: ", e) def check_secret(self): diff --git a/apps/assets/automations/base/manager.py b/apps/assets/automations/base/manager.py index 95211a3df..6c97e22ba 100644 --- a/apps/assets/automations/base/manager.py +++ b/apps/assets/automations/base/manager.py @@ -519,7 +519,7 @@ class BasePlaybookManager(PlaybookPrepareMixin, BaseManager): cb = runner.run(**kwargs) self.on_runner_success(runner, cb) except Exception as e: - self.on_runner_failed(runner, e, **runner_info) + self.on_runner_failed(runner, e, **info) finally: ssh_tunnel.local_gateway_clean(runner) print("\n")