Update how we repopulate the /host/:id/smart_inventories data

This commit is contained in:
Wayne Witzel III
2017-07-13 14:04:33 -04:00
parent e93f1d3e79
commit 6f1ef7fe0b
3 changed files with 32 additions and 10 deletions

View File

@@ -58,7 +58,7 @@ import ansiconv
from social.backends.utils import load_backends
# AWX
from awx.main.tasks import send_notifications, update_host_smart_inventory_memberships
from awx.main.tasks import send_notifications
from awx.main.access import get_user_queryset
from awx.main.ha import is_ha_environment
from awx.api.authentication import TaskAuthentication, TokenGetAuthentication
@@ -2005,14 +2005,6 @@ class HostSmartInventoriesList(SubListAPIView):
relationship = 'smart_inventories'
new_in_320 = True
def list(self, *args, **kwargs):
try:
if settings.AWX_REBUILD_SMART_MEMBERSHIP:
update_host_smart_inventory_memberships.delay()
return super(HostSmartInventoriesList, self).list(*args, **kwargs)
except Exception as e:
return Response(dict(error=_(unicode(e))), status=status.HTTP_400_BAD_REQUEST)
class HostActivityStreamList(ActivityStreamEnforcementMixin, SubListAPIView):