Skip to content
Snippets Groups Projects
Commit 99bcc20f authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

fix WS carta launch

parent e7a8387b
No related branches found
No related tags found
1 merge request!489fix WS carta launch
Pipeline #2822 passed
...@@ -49,9 +49,7 @@ class WorkflowInfo(WorkflowInfoIF): ...@@ -49,9 +49,7 @@ class WorkflowInfo(WorkflowInfoIF):
""" """
return self.session.query(WorkflowRequest).all() return self.session.query(WorkflowRequest).all()
def create_workflow_request( def create_workflow_request(self, workflow: Union[str, WorkflowIF], argument: Dict) -> WorkflowRequest:
self, workflow: Union[str, WorkflowIF], argument: Dict
) -> WorkflowRequest:
""" """
Create new workflow request and save to database Create new workflow request and save to database
...@@ -66,7 +64,11 @@ class WorkflowInfo(WorkflowInfoIF): ...@@ -66,7 +64,11 @@ class WorkflowInfo(WorkflowInfoIF):
if any(item in workflow_name for item in ["null", "download", "carta", "seci"]): if any(item in workflow_name for item in ["null", "download", "carta", "seci"]):
argument["need_project_metadata"] = False argument["need_project_metadata"] = False
if workflow_name == "carta" and len(argument["product_locator"].split(",")) == 1: if (
workflow_name == "carta"
and argument["need_data"] is True
and len(argument["product_locator"].split(",")) == 1
):
argument["single_image"] = True argument["single_image"] = True
argument["need_project_metadata"] = True argument["need_project_metadata"] = True
if workflow_name == "carta" and "parent_wf_request_id" in argument: if workflow_name == "carta" and "parent_wf_request_id" in argument:
...@@ -95,9 +97,7 @@ class WorkflowInfo(WorkflowInfoIF): ...@@ -95,9 +97,7 @@ class WorkflowInfo(WorkflowInfoIF):
self.session.add(request) self.session.add(request)
self.session.flush() self.session.flush()
def save_file( def save_file(self, request: WorkflowRequest, filename: str, content: bytes) -> WorkflowRequestFile:
self, request: WorkflowRequest, filename: str, content: bytes
) -> WorkflowRequestFile:
""" """
Save a given file for the specified request to the database Save a given file for the specified request to the database
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment