mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-26 09:31:11 +01:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user