From 6df1de4262db4b326b8e7751a227bdcb68bd74db Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Wed, 6 Sep 2023 11:18:52 -0400 Subject: [PATCH] Avoid activity stream entries for instance going offline (#14385) --- awx/main/models/ha.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/awx/main/models/ha.py b/awx/main/models/ha.py index 96c57ca3504e..5d370d24c990 100644 --- a/awx/main/models/ha.py +++ b/awx/main/models/ha.py @@ -289,7 +289,10 @@ def mark_offline(self, update_last_seen=False, perform_save=True, errors=''): if update_last_seen: update_fields += ['last_seen'] if perform_save: - self.save(update_fields=update_fields) + from awx.main.signals import disable_activity_stream + + with disable_activity_stream(): + self.save(update_fields=update_fields) return update_fields def set_capacity_value(self):