fix: distinguir sesiones normales del proveedor de fallos reales en logs y dashboard
- Solo registra "caída" cuando ffmpeg sale en <25s (error real: DNS, 403, auth, stall) - Timeouts de sesión del proveedor (~2 min) NO se registran como fallos — son normales - "Recuperado" se registra cuando el stream vuelve a funcionar tras un fallo real - Añade clasificación automática de causa: conexión rechazada, DNS, 403, timeout... - Dashboard: "reinicios" ahora distingue sesiones del proveedor (gris, normal) vs fallos (rojo) - Registro: nueva columna "Duración fallo", proveedor+dominio juntos, filas con color de fondo - StreamEvent: campo pump_duration_secs para persistir duración del fallo o interrupción Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,8 +9,9 @@ class StreamEvent(Base):
|
||||
channel_id = Column(Integer, nullable=True, index=True)
|
||||
channel_name = Column(String(500), nullable=True)
|
||||
provider_name = Column(String(200), nullable=True)
|
||||
event_type = Column(String(50), nullable=False, index=True) # caida | recuperado
|
||||
domain = Column(String(300), nullable=True)
|
||||
error_message = Column(Text, nullable=True)
|
||||
attempt_number = Column(Integer, nullable=True)
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now(), index=True)
|
||||
event_type = Column(String(50), nullable=False, index=True) # caida | recuperado
|
||||
domain = Column(String(300), nullable=True)
|
||||
error_message = Column(Text, nullable=True)
|
||||
attempt_number = Column(Integer, nullable=True)
|
||||
pump_duration_secs = Column(Integer, nullable=True) # seconds ffmpeg ran (caída) or outage length (recuperado)
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now(), index=True)
|
||||
|
||||
Reference in New Issue
Block a user