From f20c803356119502f75531584d8e11bfd89ec027 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Tue, 14 Feb 2023 18:34:46 +0800 Subject: [PATCH] perf: ansible_enabled false (#9548) Co-authored-by: feng <1304903146@qq.com> --- apps/assets/const/host.py | 6 ++++-- apps/rbac/signal_handlers.py | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/assets/const/host.py b/apps/assets/const/host.py index 0a5ff60da..11d9e3407 100644 --- a/apps/assets/const/host.py +++ b/apps/assets/const/host.py @@ -62,6 +62,9 @@ class HostTypes(BaseType): 'ansible_connection': 'ssh', }, }, + cls.OTHER_HOST: { + 'ansible_enabled': False + }, } @classmethod @@ -103,8 +106,7 @@ class HostTypes(BaseType): } } } - ], - cls.OTHER_HOST: [] + ] } @classmethod diff --git a/apps/rbac/signal_handlers.py b/apps/rbac/signal_handlers.py index bdc1e4a53..a542f548c 100644 --- a/apps/rbac/signal_handlers.py +++ b/apps/rbac/signal_handlers.py @@ -47,6 +47,5 @@ def on_org_role_permission_changed(sender, instance, action, **kwargs): @receiver([post_save, post_delete], sender=OrgRoleBinding) def on_org_role_binding_update(sender, instance, **kwargs): - print('>>>>>>>>>>>') from users.models import User User.expire_users_rbac_perms_cache()