Skip to content

Commit

Permalink
Minor corrections to spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredeen committed Aug 16, 2024
1 parent d8c72bf commit c196b01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ node_modules
.DS_Store
.idea/

# VSCode configurations
.vscode

# The media folder contents
media/*
!media/.gitkeep
Expand Down
10 changes: 6 additions & 4 deletions serve_event_listener/event_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ def listen(self) -> None:
)

max_retries = 10

# Duration in seconds to wait between retrying used when some exceptions occur
retry_delay = 2

if self.setup_complete:
Expand Down Expand Up @@ -251,7 +253,7 @@ def post(

elif status_code in [401, 403]:
logger.warning(
f"Recieved status code {status_code} - Fetching new token and retrying once"
f"Received status code {status_code} - Fetching new token and retrying once"
)
self.token = self.fetch_token()
self._status_queue.token = self.token
Expand All @@ -263,17 +265,17 @@ def post(

elif status_code in [404]:
logger.warning(
f"Recieved status code {status_code} - {response.text}"
f"Received status code {status_code} - {response.text}"
)
break

elif str(status_code).startswith("5"):
logger.warning(f"Recieved status code {status_code}")
logger.warning(f"Received status code {status_code}")
logger.warning(f"Retrying in {sleep} seconds")
time.sleep(sleep)

else:
logger.warning(f"Recieved uncaught status code: {status_code}")
logger.warning(f"Received uncaught status code: {status_code}")

logger.info(f"POST returned - Status code: {status_code}")

Expand Down

0 comments on commit c196b01

Please sign in to comment.