mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 12:41:19 -03:30
more result_stdout_text defer optimization for inventory updates
see: https://github.com/ansible/ansible-tower/issues/7568
This commit is contained in:
parent
1bb6c17fe2
commit
7a958a1af1
@ -2670,6 +2670,12 @@ class InventoryUpdateList(ListAPIView):
|
||||
model = InventoryUpdate
|
||||
serializer_class = InventoryUpdateListSerializer
|
||||
|
||||
def get_queryset(self):
|
||||
qs = super(InventoryUpdateList, self).get_queryset()
|
||||
# TODO: remove this defer in 3.3 when we implement https://github.com/ansible/ansible-tower/issues/5436
|
||||
qs = qs.defer('result_stdout_text')
|
||||
return qs
|
||||
|
||||
|
||||
class InventoryUpdateDetail(UnifiedJobDeletionMixin, RetrieveDestroyAPIView):
|
||||
|
||||
|
||||
@ -2084,6 +2084,7 @@ class UnifiedJobAccess(BaseAccess):
|
||||
# 'job_template__project',
|
||||
# 'job_template__credential',
|
||||
#)
|
||||
# TODO: remove this defer in 3.3 when we implement https://github.com/ansible/ansible-tower/issues/5436
|
||||
qs = qs.defer('result_stdout_text')
|
||||
return qs.all()
|
||||
|
||||
|
||||
@ -147,6 +147,7 @@ activity_stream_registrar.connect(WorkflowJob)
|
||||
prevent_search(User._meta.get_field('password'))
|
||||
|
||||
# Always, always, always defer result_stdout_text for polymorphic UnifiedJob rows
|
||||
# TODO: remove this defer in 3.3 when we implement https://github.com/ansible/ansible-tower/issues/5436
|
||||
def defer_stdout(f):
|
||||
def _wrapped(*args, **kwargs):
|
||||
objs = f(*args, **kwargs)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user