Commit a96a6934 authored by David Mendez's avatar David Mendez

Start to create the subet generator service

parent 5348ec11
......@@ -4,9 +4,11 @@
from flask import Blueprint, jsonify, abort, request
from app.blueprints.subset_generator_blueprint.controllers import marshmallow_schemas
from import subset_generator_service
from app.request_validation.decorators import validate_form_with, validate_url_params_with
from app import app_logging
SUBSET_GENERATOR_BLUEPRINT = Blueprint('es_subsets', __name__)
......@@ -24,11 +26,10 @@ def submit_subset_creation_from_ids():
app_logging.debug(f'origin_index: {origin_index}')
app_logging.debug(f'items_ids: {items_ids}')
# try:
return jsonify({'msg': 'hola'})
return jsonify({'msg': 'hola'})
except subset_generator_service.SubsetGeneratorServiceError as error:
# except es_proxy_service.ESProxyServiceError as error:
# abort(500, msg=f'Internal server error: {str(error)}')
\ No newline at end of file
abort(500, msg=f'Internal server error: {str(error)}')
Subset generator service
class SubsetGeneratorServiceError(Exception):
"""Base class for exceptions in the properties configuration service."""
def submit_subset_generation_from_ids(origin_index, items_ids):
Starts the process of the generation of the subset based on the ids passed as parameter
:param origin_index: source index for the subset
:param items_ids: ids of the items to include
:return: an id of the task to check it's progress
return {
'task_id': 'some_id'
......@@ -40,6 +40,8 @@ paths:
description: 'List of IDs to used to create the subset index'
required: true
type: 'array'
type: 'string'
default: ['CHEMBL27193', 'CHEMBL4068896', 'CHEMBL332148', 'CHEMBL2431212', 'CHEMBL4303667']
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment