Skip to content
Snippets Groups Projects
Commit df79a180 authored by Nathan Hertz's avatar Nathan Hertz
Browse files

More setup for running download capability; nothing of consequence

parent b3969d54
No related branches found
No related tags found
1 merge request!67SWS-7: download workflow template
Pipeline #463 passed
......@@ -18,7 +18,7 @@ depends_on = None
def upgrade():
op.execute(
"INSERT INTO capabilities (capability_name, capability_steps, max_jobs) "
"VALUES ('test_download', 'prepare-and-run-workflow deliver -r,-l\nawait-workflow', 2)"
"VALUES ('test_download', 'prepare-and-run-workflow deliver [-r, -l]\nawait-workflow', 2)"
)
op.execute("INSERT INTO workflows (workflow_name) VALUES ('test_download')")
op.execute(
......
......@@ -155,8 +155,19 @@ class CapabilitySequence(CapabilitySequenceIF):
class PrepareAndRunWorkflow(CapabilityStep):
"""
Class representing a prepare-and-run-workflow capability step
"""
def execute(self, engine: CapabilityEngineIF, execution: CapabilityExecutionIF):
"""
Execute a workflow within an engine
:param engine: Engine that will execute the workflow
:param execution: Execution record for executing capability
"""
workflow_name = self.step_value
workflow_args = None
parameters = execution.capability_request.parameters
# FIXME: Add support for files
files = []
......@@ -165,7 +176,9 @@ class PrepareAndRunWorkflow(CapabilityStep):
# DO NOT TAKE THIS OUT! Python will yell at you.
parameters = json.dumps(parameters)
workflow_args = json.loads(parameters)
engine.submit_workflow_request(execution.id, workflow_name, workflow_args, files)
engine.submit_workflow_request(
execution.id, workflow_name, workflow_args, files
)
class AwaitQa(CapabilityStep):
......
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