update retry logic and logging

### What
1. configureable retry count
2. additional logging

### Why
1. pass retry count as a command line arg; default 5
2. show details when api requests fail

### Testing before merge
compiles cleanly

### Validation after merge
compile and test

### Issue addressed by this PR
https://github.com/stellar/ops/issues/2039
This commit is contained in:
michaelmartinez
2025-12-22 14:23:02 -08:00
parent 81a72ac8af
commit 89502c326d
3 changed files with 19 additions and 5 deletions

View File

@@ -4,6 +4,7 @@
import logging
import os
import sys
from github_backup import max_retries
from github_backup.github_backup import (
backup_account,
@@ -39,6 +40,7 @@ logging.basicConfig(level=logging.INFO, handlers=[stdout_handler, stderr_handler
def main():
"""Main entry point for github-backup CLI."""
args = parse_args()
max_retries.MAX_RETRIES = args.max_retries
if args.private and not get_auth(args):
logger.warning(