esc-reporting/esc-collect.py |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit ac933a7c5ee08f4551358c79150687797f5fec17
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon Mar 8 13:03:26 2021 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Mar 8 13:03:26 2021 +0100

    esc-collect: use is:open only when the file doesn't exist
    
    Change-Id: I0aeb595f814fbf92ba2c612d4af7fe9515ee7f24

diff --git a/esc-reporting/esc-collect.py b/esc-reporting/esc-collect.py
index 81721b5..615f82e 100755
--- a/esc-reporting/esc-collect.py
+++ b/esc-reporting/esc-collect.py
@@ -605,7 +605,13 @@ def get_gerrit(cfg):
     if p.wait() != 0:
         raise CalledProcessError(p.returncode, cmd)
 
-    url = 'https://gerrit.libreoffice.org/changes/?q=after:' + 
searchDate.strftime("%Y-%m-%d") + \
+    queryType = 'q=after'
+    if not os.path.isfile(fileName):
+      # if gerrit_dump.json doesn't exist, the script will request the data 
from the last 365 days.
+      # This is slow and will probably timeout. In this case, only care about 
open tickets
+      queryType = 'q=is:open+after:'
+
+    url = 'https://gerrit.libreoffice.org/changes/?' + queryType + ':' + 
searchDate.strftime("%Y-%m-%d") + \
         
'&o=DETAILED_LABELS&o=DETAILED_ACCOUNTS&o=MESSAGES&o=CURRENT_COMMIT&o=CURRENT_REVISION&limit=200&start='
     offset = 0
     if 'offset' in rawList:
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to