]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
quay-pruner: add page limit constants for hacking/debugging
authorDan Mick <dmick@redhat.com>
Sat, 5 Dec 2020 02:16:43 +0000 (02:16 +0000)
committerDan Mick <dmick@redhat.com>
Mon, 7 Dec 2020 23:25:14 +0000 (23:25 +0000)
Signed-off-by: Dan Mick <dmick@redhat.com>
quay-pruner/build/prune-quay.py

index 46537742a872c571156690e51d7eb413e8d2721a..705907393f0e272b00f68908f55b12e434268e3e 100755 (executable)
@@ -9,13 +9,17 @@ import sys
 QUAYBASE = "https://quay.ceph.io/api/v1"
 REPO = "ceph-ci/ceph"
 
+# quay page ranges to fetch; hackable for testing
+start_page = 1
+page_limit = 100000
+
 
 def get_all_quay_tags(quaytoken):
-    page = 1
+    page = start_page
     has_additional = True
     ret = list()
 
-    while has_additional:
+    while has_additional and page < page_limit:
         try:
             response = requests.get(
                 '/'.join((QUAYBASE, 'repository', REPO, 'tag')),