@@ -53,7 +53,6 @@ def index():
5353
5454@app .route ('/actualizar-conexiones' )
5555def actualizar_conexiones ():
56- """Retorna solo el HTML parcial de las conexiones por usuario"""
5756 try :
5857 raw_data = fetch_squid_data ()
5958 if 'Error' in raw_data :
@@ -62,8 +61,6 @@ def actualizar_conexiones():
6261
6362 connections = parse_raw_data (raw_data )
6463 grouped_connections = group_by_user (connections )
65-
66- # Renderiza solo el fragmento parcial que actualizarás con JS
6764 return render_template ('partials/conexiones.html' , grouped_connections = grouped_connections )
6865
6966 except Exception as e :
@@ -80,8 +77,7 @@ def cache_stats():
8077 data = fetch_squid_cache_stats ()
8178 stats_data = vars (data ) if hasattr (data , '__dict__' ) else data
8279 logger .info ("Successfully fetched cache statistics" )
83- return render_template ('cacheView.html' , cache_stats = stats_data ,
84- refresh_interval = refresh_interval )
80+ return render_template ('cacheView.html' , cache_stats = stats_data )
8581
8682 except Exception as e :
8783 logger .error (f"Error fetching cache stats: { str (e )} " )
@@ -98,7 +94,7 @@ def logs():
9894 print (f"Error en ruta /logs: { e } " )
9995 return render_template ('error.html' , message = "Error retrieving logs" ), 500
10096
101- @scheduler .task ('interval' , id = 'do_job_1' , seconds = 120 , misfire_grace_time = 900 )
97+ @scheduler .task ('interval' , id = 'do_job_1' , seconds = 30 , misfire_grace_time = 900 )
10298def init_scheduler ():
10399 """Initialize and start the background scheduler for log processing"""
104100 log_file = os .getenv ("SQUID_LOG" , "/var/log/squid/access.log" )
0 commit comments