Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
aj-ya committed May 21, 2024
1 parent 1e63e99 commit fb394a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion outpostcli/lfs/part.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,19 @@ def transfer_part(part: PartInfo):
read_limit=part.chunk_size,
) as data:
try:
_log.info(f"uploading part of {part.filepath}, part no: {part.no}")
r = retriable_upload_part(part.url, data)
etag = str(r.headers.get("etag"))
_log.info(
f"completed upload part of {part.filepath}, part no: {part.no}, etag: {etag}"
)
return UploadedPartObject(
{
"etag": str(r.headers.get("etag")),
"etag": etag,
"part_number": part.no,
}
)

except Exception as e:
_log.error(e)
return ProxyLFSException(code=500, message=f"Unhandled Error: {e}")
2 changes: 1 addition & 1 deletion outpostcli/lfs/storage_class/gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def gcs_multipart_upload(msg: Dict[str, Any]):
initiate_url = msg["action"]["href"]

upload_id = initiate_multipart_upload(initiate_url)

_log.info(f"initiated multipart upload of file {filepath}, upload_id: {upload_id}")
header = msg["action"]["header"]
chunk_size = int(header.pop("chunk_size"))
abort_url = gen_upload_specific_url(str(header.pop("abort_url")), upload_id)
Expand Down

0 comments on commit fb394a6

Please sign in to comment.