feat(automate): return blob id from file results (#445)

This commit is contained in:
Chuck Driesler
2025-08-26 15:27:13 +01:00
committed by GitHub
parent 7bc78b6bf9
commit a6790c7c70
+3 -1
View File
@@ -268,7 +268,7 @@ class AutomationContext:
print(f"Reporting run status with content: {params}")
self.speckle_client.httpclient.execute(query, params)
def store_file_result(self, file_path: Union[Path, str]) -> None:
def store_file_result(self, file_path: Union[Path, str]) -> str:
"""Save a file attached to the project of this automation."""
path_obj = (
Path(file_path).resolve() if isinstance(file_path, str) else file_path
@@ -310,6 +310,8 @@ class AutomationContext:
[upload_result.blob_id for upload_result in upload_response.upload_results]
)
return upload_response.upload_results[0].blob_id
def mark_run_failed(self, status_message: str) -> None:
"""Mark the current run a failure."""
self._mark_run(AutomationStatus.FAILED, status_message)