def post(self): json_data = request.get_json(force=True) app_context.init() app_context.application_context = json_data log_info( "Resource Layout_Detector_WF Layout_Detector service started", app_context.application_context) task_id = str("LD-" + str(time.time()).replace('.', '')[0:13]) task_starttime = eval(str(time.time()).replace('.', '')[0:13]) #json_data = request.get_json(force = True) try: error_validator = ValidationResponse(DOWNLOAD_FOLDER) if error_validator.format_error(json_data) is True: response_gen = Response(json_data, DOWNLOAD_FOLDER) response = response_gen.workflow_response( task_id, task_starttime) log_info( "Resource Layout_Detector_WF Layout_Detector api response completed", app_context.application_context) return jsonify(response) except FormatError as e: log_error( "Resource Layout_Detector_WF Input json format is not correct or dict_key is missing", app_context.application_context, e) return Status.ERR_request_input_format.value
def post(self): json_data = request.get_json(force=True) app_context.init() app_context.application_context = json_data log_info("Resource Vision_OCR service started", app_context.application_context) try: error_validator = ValidationResponse(DOWNLOAD_FOLDER) if error_validator.format_error(json_data) is True: response_gen = Response(json_data, DOWNLOAD_FOLDER) response = response_gen.nonwf_response() log_info("Resource Vision_OCR api response completed", app_context.application_context) return jsonify(response) except FormatError as e: log_error("Resource Vision_OCR Input json format is not correct or dict_key is missing", app_context.application_context, e) return Status.ERR_request_input_format.value
def post(self): log_info("Resource BlockMerger", "Block-merger service started", None) json_data = request.get_json(force=True) try: error_validator = ValidationResponse(DOWNLOAD_FOLDER) if error_validator.format_error(json_data) is True: response_gen = Response(json_data, DOWNLOAD_FOLDER) response = response_gen.nonwf_response() log_info("Resource BlockMerger", "Block-merger api response completed", None) return jsonify(response) except FormatError as e: log_error( "Resource BlockMerger", "Input json format is not correct or dict_key is missing", None, e) return Status.ERR_request_input_format.value
def post(self): log_info("Resource BlockMergerWF", "Block-merger service started", None) task_id = str("BM-" + str(time.time()).replace('.', '')) task_starttime = str(time.time()).replace('.', '') json_data = request.get_json(force=True) try: error_validator = ValidationResponse(DOWNLOAD_FOLDER) if error_validator.format_error(json_data) is True: response_gen = Response(json_data, DOWNLOAD_FOLDER) response = response_gen.workflow_response( task_id, task_starttime) log_info("Resource BlockMergerWF", "Block-merger api response completed", None) return jsonify(response) except FormatError as e: log_error( "Resource BlockMergerWF", "Input json format is not correct or dict_key is missing", None, e) return Status.ERR_request_input_format.value