diff --git a/lib/gitlab.py b/lib/gitlab.py index 777b3d3..69b922f 100644 --- a/lib/gitlab.py +++ b/lib/gitlab.py @@ -121,7 +121,8 @@ def project_export(self, project_path): r = self.__api_export(url_project_path) if ((float(r.status_code) >= 200) and (float(r.status_code) < 300)): # Api good, check for status - max_tries = 30 + max_tries_number = 10 + max_tries = max_tries_number s = "" status_export = False while max_tries != 0: @@ -145,6 +146,10 @@ def project_export(self, project_path): if s == "finished" and "_links" in json.keys(): status_export = True break + + if s == "queued" or s == "finished" or s == "started" or s == "regeneration_in_progress": + # Reset counter, we are waiting for export + max_tries = max_tries_number else: s = "unknown"