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

workflow rest api work - requests now persist ... sort of ...

parent ce689d31
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,7 @@ class WorkflowRestService:
# all we should have to do here is take the WorkflowRequest from the context and
# hand it to WorkflowInfo to save it, but we're still conflating
# workflows and workflow requests right now
request = self.request.workflows.create_workflow_request(
request = self.request.info.create_workflow_request(
workflow_name=self.request.GET.get('name'), argument=self.request.GET.getall('args'))
return request
......@@ -188,7 +188,7 @@ def main(global_config, **settings):
config.add_route('workflows', '/workflows')
config.add_route('workflow', '/workflows/{name}', factory=lookup_workflow)
config.add_route('create_workflow', '/workflows/create', factory=lookup_workflow)
config.add_route('create_workflow', '/workflows/{name}/create', factory=lookup_workflow)
config.add_route('submit_workflow', '/workflows/{name}/submit', factory=lookup_workflow)
config.add_route('workflow_files', '/workflows/{name}/files', factory=lookup_workflow)
config.add_route('workflow_file', '/workflows/{name}/files/{filename}', factory=lookup_file)
......
......@@ -443,6 +443,12 @@ class WorkflowRequest(Base):
def set_end_time(self, time: str):
self.end_time = time
def __json__(self, request) -> dict:
return dict(
workflow_request_id=self.workflow_request_id,
workflow_name=self.workflow_name,
argument=self.argument,)
def __repr__(self):
return f"<WorkflowRequest workflow_request_id= {self.workflow_request_id}>"
......
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