Avoid unwanted activity stream entries on startup

Schedule computed fields generates a modification entry
on system startup - this change avoids that noise
This commit is contained in:
AlanCoding 2017-07-10 10:50:22 -04:00
parent 1a46f7b451
commit 11a8b53e8f

View File

@ -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))