Ver Fonte

fix script restart service sqstats

Manuel há 1 ano atrás
pai
commit
45b163dd0a
2 ficheiros alterados com 1 adições e 3 exclusões
  1. 1 1
      install.sh
  2. 0 2
      services/fetch_data_logs.py

+ 1 - 1
install.sh

@@ -258,7 +258,7 @@ function main() {
      if [ "$1" = "--update" ]; then
      if [ "$1" = "--update" ]; then
       echo "Actualizando Servicio..."
       echo "Actualizando Servicio..."
       updateOrCloneRepo
       updateOrCloneRepo
-      ystemctl restart squidstats.service
+      systemctl restart squidstats.service
 
 
       ok "Actualizacion completada! Acceda en: \033[1;37mhttp://IP:5000\033[0m"
       ok "Actualizacion completada! Acceda en: \033[1;37mhttp://IP:5000\033[0m"
     else
     else

+ 0 - 2
services/fetch_data_logs.py

@@ -50,13 +50,11 @@ def get_users_with_logs_by_date(db: Session, date_suffix: str):
         users_table = f'users_{date_suffix}'
         users_table = f'users_{date_suffix}'
         logs_table = f'logs_{date_suffix}'
         logs_table = f'logs_{date_suffix}'
 
 
-        # Corregir aquí (usar get_bind())
         inspector = inspect(db.get_bind())
         inspector = inspect(db.get_bind())
 
 
         if not inspector.has_table(users_table) or not inspector.has_table(logs_table):
         if not inspector.has_table(users_table) or not inspector.has_table(logs_table):
             return []
             return []
 
 
-        # Corregir consultas (remover .session)
         users = db.query(User). \
         users = db.query(User). \
             with_entities(
             with_entities(
             User.id,
             User.id,