From 05419d010bb9353bfce2c5f8346a78151b866814 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Tue, 24 Apr 2018 21:40:11 -0400 Subject: [PATCH] Update group cluster policies on save, not just created Currently updating policy settings doesn't trigger a re-evaluation of instance group policies, this makes sure we re-evaluate in the event that anything changes. --- awx/main/models/ha.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/awx/main/models/ha.py b/awx/main/models/ha.py index b7e50ec2b4..471276c560 100644 --- a/awx/main/models/ha.py +++ b/awx/main/models/ha.py @@ -192,9 +192,8 @@ class JobOrigin(models.Model): @receiver(post_save, sender=InstanceGroup) def on_instance_group_saved(sender, instance, created=False, raw=False, **kwargs): - if created: - from awx.main.tasks import apply_cluster_membership_policies - connection.on_commit(lambda: apply_cluster_membership_policies.apply_async()) + from awx.main.tasks import apply_cluster_membership_policies + connection.on_commit(lambda: apply_cluster_membership_policies.apply_async()) @receiver(post_save, sender=Instance)