Skip to content
Snippets Groups Projects

use working dir weblog for failed requests

Merged Charlotte Hausman requested to merge fix_failed_weblog_access into main
All threads resolved!
1 file
+ 5
0
Compare changes
  • Side-by-side
  • Inline
@@ -172,9 +172,14 @@ class WorkflowWorkingDirRestService:
results_path = Path(requested_workflow.results_dir)
index_path_list = list(results_path.glob("products/pipeline-*/html/index.html"))
failed_weblog_path_list = list(results_path.glob("working/pipeline-*/html/index.html"))
if index_path_list and len(index_path_list) == 1:
index_path = index_path_list[0]
elif failed_weblog_path_list and len(failed_weblog_path_list) == 1:
# check for weblog in working directory (needed for errored or failed requests)
index_path = failed_weblog_path_list[0]
else:
# otherwise, return weblog not found
return Response(
status_int=http.HTTPStatus.NOT_FOUND,
json_body={
Loading