diff --git a/tpmcqr_service/api/parada.py b/tpmcqr_service/api/parada.py index 8b7414b..6c083e8 100644 --- a/tpmcqr_service/api/parada.py +++ b/tpmcqr_service/api/parada.py @@ -1,13 +1,14 @@ from flask import Blueprint, jsonify from tpmcqr_service import redis_client from tpmcqr_service.api.utils import calcula_distancias_parada +from time import monotonic apiv2 = Blueprint('apiv2', __name__) @apiv2.route('/api_v2/') def info_parada(parada=None): - + from time import monotonic current_file = redis_client.get('current_file') status, salida_parada = calcula_distancias_parada(current_file, parada) - + salida_parada['compute_time'] = monotonic() - start_time return jsonify(salida_parada), status# from tpmcqr_service.errors.handlers import errors