Skip to content

Commit

Permalink
refactor: add error log if max polling duration reached
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Feb 7, 2024
1 parent 1c288dc commit 12f0bee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions osm_rawdata/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,11 @@ def queryRemote(
elif result_json.get("status") == "SUCCESS":
break

else:
# Maximum polling duration reached
log.error(f"{max_polling_duration} second elapsed. Aborting data extract.")
return None

zip_url = result_json["result"]["download_url"]
result = self.session.get(zip_url, headers=self.headers)
fp = BytesIO(result.content)
Expand Down

0 comments on commit 12f0bee

Please sign in to comment.