mirror of
https://github.com/ansible/awx.git
synced 2026-08-07 05:11:43 -02:30
AC-982 Added configuration options to disable activity stream logging entirely, or disable only when running inventory import.
This commit is contained in:
@@ -24,7 +24,7 @@ from django.contrib.auth.models import User
|
||||
|
||||
# AWX
|
||||
from awx.main.models import *
|
||||
from awx.main.signals import ignore_inventory_computed_fields
|
||||
from awx.main.signals import ignore_inventory_computed_fields, disable_activity_stream
|
||||
from awx.main.licenses import LicenseReader
|
||||
|
||||
logger = logging.getLogger('awx.main.commands.inventory_import')
|
||||
@@ -755,7 +755,11 @@ class Command(NoArgsCommand):
|
||||
|
||||
# Merge/overwrite inventory into database.
|
||||
with ignore_inventory_computed_fields():
|
||||
self.load_into_database()
|
||||
if getattr(settings, 'ACTIVITY_STREAM_ENABLED_FOR_INVENTORY_SYNC', True):
|
||||
self.load_into_database()
|
||||
else:
|
||||
with disable_activity_stream():
|
||||
self.load_into_database()
|
||||
self.inventory.update_computed_fields()
|
||||
self.check_license()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user