diff --git a/src/api/src/backend/services/TaskService.py b/src/api/src/backend/services/TaskService.py index 4f285333..03ee73f8 100644 --- a/src/api/src/backend/services/TaskService.py +++ b/src/api/src/backend/services/TaskService.py @@ -15,6 +15,7 @@ TASK_TYPE_TAPIS_JOB, TASK_TYPE_TAPIS_ACTOR, TASK_TYPE_FUNCTION, + TASK_TYPE_TEMPLATE, DESTINATION_TYPE_LOCAL, DESTINATION_TYPE_DOCKERHUB, ) @@ -25,6 +26,7 @@ TapisJobTask, TapisActorTask, FunctionTask, + TemplateTask, DockerhubDestination, LocalDestination, EnumTaskIOTypes, @@ -44,7 +46,8 @@ TASK_TYPE_CONTAINER_RUN: ApplicationTask, # Keep for backwards compatibility. container_run renamed to application TASK_TYPE_TAPIS_JOB: TapisJobTask, TASK_TYPE_TAPIS_ACTOR: TapisActorTask, - TASK_TYPE_FUNCTION: FunctionTask + TASK_TYPE_FUNCTION: FunctionTask, + TASK_TYPE_TEMPLATE: TemplateTask } DESTINATION_TYPE_REQUEST_MAPPING = { @@ -84,6 +87,11 @@ def create(self, pipeline, request): for key in request.input: _input[key] = request.input[key].dict() + # Prepare the uses property + uses = getattr(request, "uses", None) + if uses != None: + uses = uses.dict() + # Create task try: task = Task.objects.create( @@ -122,6 +130,7 @@ def create(self, pipeline, request): getattr(request, "tapis_actor_message", None) ), url=getattr(request, "url", None), + uses=uses, # Exection profile flavor=request.execution_profile.flavor, max_exec_time=request.execution_profile.max_exec_time,