Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions task-runner/task_runner/task_request_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ def save_output(
) -> bool:
output_size_bytes = self._pack_output(output_filename=output_filename)

if output_size_bytes == 0:
return False

# NOTE: This event is published even if the output size is 0, to
# inform the BE that the task has finished. The TaskOutputUploadFailed
# event is only published if an exception occurs during upload.
self._publish_event(
events.TaskOutputUploaded(
id=self.task_id,
Expand All @@ -212,6 +212,9 @@ def save_output(
force=force,
)

if output_size_bytes == 0:
return False

# Remove the request JSON file to prevent multiple uploads
# after a successful task data upload
if os.path.exists(self.request_path):
Expand Down