Skip to content

Commit

Permalink
Only log duplicate file line if there are dupe files (#795)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykeremy authored Sep 9, 2024
1 parent e7641e7 commit faf3191
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions skyvern/forge/sdk/routes/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ async def task_stream(

if task.status == TaskStatus.running:
file_name = f"{task_id}.png"
if task.workflow_run_id:
file_name = f"{task.workflow_run_id}.png"
screenshot = await app.STORAGE.get_streaming_file(organization_id, file_name)
if screenshot:
encoded_screenshot = base64.b64encode(screenshot).decode("utf-8")
Expand Down
7 changes: 4 additions & 3 deletions skyvern/forge/sdk/workflow/models/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -985,9 +985,10 @@ async def _build_email_message(
# Log file statistics
LOG.info("SendEmailBlock: Total files attached", total_files=total_files)
LOG.info("SendEmailBlock: Unique files (based on content) attached", unique_files=unique_files)
LOG.info(
"SendEmailBlock: Duplicate files (based on content) attached", duplicate_files_list=duplicate_files_list
)
if duplicate_files_list:
LOG.info(
"SendEmailBlock: Duplicate files (based on content) attached", duplicate_files_list=duplicate_files_list
)

return msg

Expand Down

0 comments on commit faf3191

Please sign in to comment.