Example #1
0
def history_json():
    try:
        service = get_proxy()
        result = service.history_json
        return Response(result, mimetype="text/json", status=200)
    except Exception as ex:
        logger.exception(f"Exception: {ex}")
        return str(ex), 500
Example #2
0
def current_html():
    try:
        service = get_proxy()
        result = service.current_html
        return render_template("check_results.html", result=result)
    except Exception as ex:
        logger.exception(f"Exception: {ex}")
        return str(ex), 500
Example #3
0
def current_csv():
    try:
        service = get_proxy()
        result = service.current_csv
        return Response(result, mimetype="text/csv", status=200)
    except Exception as ex:
        logger.exception(f"Exception: {ex}")
        return str(ex), 500
Example #4
0
def service_load_dates() -> Tuple[datetime, datetime, datetime]:
    " returns flask app start time, Pyro4 service start time, and current time (all ET)"
    try:
        service = get_proxy()
        service_date = datetime.fromisoformat(service.load_date)
        return load_date, service_date, udatetime.now_as_eastern() 
    except Exception as ex:
        logger.exception(ex)
        return load_date, None, udatetime.now_as_eastern()