From 11a8b53e8ffb4cc111fe72ec644531e4b83ce15b Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Mon, 10 Jul 2017 10:50:22 -0400 Subject: [PATCH] Avoid unwanted activity stream entries on startup Schedule computed fields generates a modification entry on system startup - this change avoids that noise --- awx/main/tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index a20db257c3..3ffb46648e 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -83,7 +83,9 @@ def celery_startup(conf=None, **kwargs): for sch in Schedule.objects.all(): try: sch.update_computed_fields() - sch.save() + from awx.main.signals import disable_activity_stream + with disable_activity_stream(): + sch.save() except Exception as e: logger.error("Failed to rebuild schedule {}: {}".format(sch, e))