jbianchi81 / gesina

0 stars 0 forks source link

Informar del error si no se encuentra una serie de borde #12

Closed cerobpm closed 6 months ago

cerobpm commented 11 months ago

Actualmente imprime el error en el log del scheduler, no se ejecuta la corrida programada, pero al usuario de la UI no se lo notifica del error.

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/apscheduler/executors/base.py", line 125, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/src/src/scheduler.py", line 76, in simulate
    flow_file = flow_file or new_build_flow(
  File "/app/src/util/file_builder.py", line 196, in new_build_flow
    conditions = get_forecast_and_observation_values(
  File "/app/src/util/file_builder.py", line 153, in get_forecast_and_observation_values
    "values": ina_service.obtain_curated_series(
  File "/app/src/service/ina_service.py", line 144, in obtain_curated_series
    data = response.json()["series"][0]["pronosticos"]
IndexError: list index out of range

Mismo caso cuando se ingresan salidas duplicadas:

  File "/usr/local/lib/python3.10/site-packages/psycopg2/extras.py", line 1270, in execute_values
    cur.execute(b''.join(parts))
sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "execution_plan_output_pkey"
DETAIL:  Key (river, reach, river_stat, execution_plan_id)=(Parana,  ParanaAA, 18.96, 8) already exists.
manulon commented 7 months ago

Solucionado. @cerobpm Te envíe un correo preguntando algo tecnico de la aplicacion, te arrobo por aca por si no lo pudiste ver o se te pasó.