Skip to content

Commit

Permalink
Add download logging
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-va committed Oct 15, 2024
1 parent 86740dd commit 8fca7f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def collect(
"has_finished": True,
"data": result.value,
})

return JSONResponse(status_code=status.HTTP_200_OK, content={
"has_finished": True,
"error": "Internal Server Error",
Expand All @@ -81,6 +81,7 @@ def process(
output_path = os.path.join(tmp_dir, "output.pdf")

aws_client = aws.connect(settings)
print(f"Downloading file {settings.s3_input_folder}{payload.file} @ {settings.s3_input_bucket} to {input_path}")
aws.load_file(
aws_client.bucket(settings.s3_input_bucket),
f'{settings.s3_input_folder}{payload.file}',
Expand Down

0 comments on commit 8fca7f8

Please sign in to comment.