Only log duplicate file line if there are dupe files (#795)
This commit is contained in:
@@ -89,8 +89,6 @@ async def task_stream(
|
|||||||
|
|
||||||
if task.status == TaskStatus.running:
|
if task.status == TaskStatus.running:
|
||||||
file_name = f"{task_id}.png"
|
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)
|
screenshot = await app.STORAGE.get_streaming_file(organization_id, file_name)
|
||||||
if screenshot:
|
if screenshot:
|
||||||
encoded_screenshot = base64.b64encode(screenshot).decode("utf-8")
|
encoded_screenshot = base64.b64encode(screenshot).decode("utf-8")
|
||||||
|
|||||||
@@ -985,9 +985,10 @@ class SendEmailBlock(Block):
|
|||||||
# Log file statistics
|
# Log file statistics
|
||||||
LOG.info("SendEmailBlock: Total files attached", total_files=total_files)
|
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: Unique files (based on content) attached", unique_files=unique_files)
|
||||||
LOG.info(
|
if duplicate_files_list:
|
||||||
"SendEmailBlock: Duplicate files (based on content) attached", duplicate_files_list=duplicate_files_list
|
LOG.info(
|
||||||
)
|
"SendEmailBlock: Duplicate files (based on content) attached", duplicate_files_list=duplicate_files_list
|
||||||
|
)
|
||||||
|
|
||||||
return msg
|
return msg
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user