Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7517682456 | |||
| 46b6c0d68c |
-1087
File diff suppressed because it is too large
Load Diff
@@ -9,5 +9,9 @@ sys.path.append(str(src_path))
|
||||
from src.main import automate_function, FunctionInputs
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("---------")
|
||||
print("| BEGIN |")
|
||||
print("---------")
|
||||
|
||||
# Entry point: Execute the automate function with defined inputs.
|
||||
execute_automate_function(automate_function, FunctionInputs)
|
||||
|
||||
+3
-6
@@ -73,11 +73,6 @@ def automate_function(
|
||||
automate_context, health_objects, function_inputs.density_level
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
colorise_densities(automate_context, health_objects)
|
||||
|
||||
# Wrap up the analysis by marking the run either successful or failed.
|
||||
@@ -113,7 +108,9 @@ def automate_function(
|
||||
|
||||
file_name = write_pdf_to_temp(report)
|
||||
|
||||
print(commit_details["server_url"])
|
||||
print("------------------------------------------------")
|
||||
print(f"| {commit_details['server_url']} |")
|
||||
print("------------------------------------------------")
|
||||
|
||||
safe_store_file_result(automate_context, file_name)
|
||||
|
||||
|
||||
@@ -276,14 +276,14 @@ def safe_store_file_result(automate_context: AutomationContext, file_name: str):
|
||||
# Attempt to store the file
|
||||
automate_context.store_file_result(file_name)
|
||||
except httpx.HTTPStatusError as e:
|
||||
if e.response.status_code == 404:
|
||||
if e.response.status_code != 404:
|
||||
raise
|
||||
|
||||
else:
|
||||
# Handle the 404 error
|
||||
error_message = f"Unable to store file: {file_name}. Error: {str(e)}"
|
||||
print(error_message) # For logging purposes
|
||||
automate_context.mark_run_exception(error_message)
|
||||
|
||||
else:
|
||||
raise
|
||||
# automate_context.mark_run_exception(error_message)
|
||||
finally:
|
||||
# Restore the original URL
|
||||
automate_context.automation_run_data.speckle_server_url = original_url
|
||||
|
||||
Reference in New Issue
Block a user