newModuleTagger: add retries
This commit is contained in:
@@ -60,11 +60,15 @@ query($endCursor: String) {
|
||||
|
||||
|
||||
def _gh(args: list[str]) -> str | None:
|
||||
try:
|
||||
return subprocess.check_output(["gh", *args], text=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(e)
|
||||
return None
|
||||
for attempt in range(1, MAX_RETRIES + 1):
|
||||
try:
|
||||
return subprocess.check_output(["gh", *args], text=True, stderr=subprocess.DEVNULL)
|
||||
except subprocess.CalledProcessError as e:
|
||||
if attempt == MAX_RETRIES:
|
||||
print(e)
|
||||
return None
|
||||
time.sleep(RETRY_BACKOFF_SECONDS * attempt)
|
||||
return None
|
||||
|
||||
|
||||
def find_prs_without_new_module_tag():
|
||||
|
||||
Reference in New Issue
Block a user