Skip to content

Commit

Permalink
Log file status after copy for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjkhan committed Dec 31, 2022
1 parent 6b31f4b commit 21fe9c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cdp_backend/utils/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def resource_copy(
# It was added because it's very common for SSL certs to be bad
# See: https://github.com/CouncilDataProject/cdp-scrapers/pull/85
# And: https://github.com/CouncilDataProject/seattle/runs/5957646032

with open(dst, "wb") as open_dst:
open_dst.write(
requests.get(
Expand All @@ -237,6 +238,10 @@ def resource_copy(
timeout=1800,
).content
)
log.info(f"File complete: {str(dst)}")
log.info(f"URI complete: {str(uri)}")
log.info(f"File exists: {dst.exists()}")
log.info(f"File stats: {dst.stat()}")

else:
# TODO: Add explicit use of GCS credentials until public read is fixed
Expand Down

0 comments on commit 21fe9c5

Please sign in to comment.