Skip to content

Commit

Permalink
logging fix, and longer delay
Browse files Browse the repository at this point in the history
  • Loading branch information
dlubom committed Jul 24, 2024
1 parent f71f87f commit ac5f6f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iata_code_fetcher/fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Frequency of processing status updates
REPORT_FREQUENCY: int = 100 # report every 100 codes
MAX_RETRIES: int = 3
RETRY_DELAY: int = 5 # seconds
RETRY_DELAY: int = 15 # seconds
TIMEOUT: int = 20 # seconds

# Configure Logging
Expand Down Expand Up @@ -87,7 +87,7 @@ def fetch_and_process_data(code: str, code_type: CodeType) -> List[Dict[str, str
except RequestException as e:
if attempt < MAX_RETRIES - 1:
logging.warning(
"Request failed for %s. Retrying in {%d} seconds... (Attempt {%d}/{%d})",
"Request failed for %s. Retrying in %d seconds... (Attempt %d/%d)",
code,
RETRY_DELAY,
attempt + 1,
Expand Down

0 comments on commit ac5f6f9

Please sign in to comment.