Pablo Iranzo Gómez has uploaded a new change for review.

Change subject: Fix for changes introduced in BZ1025320 to avoid hitting 
performance issues
......................................................................

Fix for changes introduced in BZ1025320 to avoid hitting performance issues

Change-Id: I2c3cf488df334b5dcf43904a4c67f9abcbe38f87
Signed-off-by: Pablo <pablo.ira...@gmail.com>
---
M src/helper/hypervisors.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-log-collector 
refs/changes/53/28053/1

diff --git a/src/helper/hypervisors.py b/src/helper/hypervisors.py
index d691c97..5e546d9 100644
--- a/src/helper/hypervisors.py
+++ b/src/helper/hypervisors.py
@@ -153,11 +153,14 @@
     @param oquery: optional query to limit results
     """
     page = 0
-    length = 100
+    page_size = 100
+    length = page_size
     while length > 0:
         page += 1
         query = "%s page %s" % (oquery, page)
-        tanda = entity.list(query=query)
+        # after BZ1025320 default is provide all results
+        # this limits results on each iteration to page_size
+        tanda = entity.list(query=query, max=page_size)
         length = len(tanda)
         for elem in tanda:
             yield elem


-- 
To view, visit http://gerrit.ovirt.org/28053
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c3cf488df334b5dcf43904a4c67f9abcbe38f87
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-log-collector
Gerrit-Branch: master
Gerrit-Owner: Pablo Iranzo Gómez <pablo.ira...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to