highing666 3 лет назад
Родитель
Сommit
7432877e51
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      app/controllers/equipment/fcu/early_start.py
  2. 1 1
      app/db/session.py

+ 1 - 1
app/controllers/equipment/fcu/early_start.py

@@ -23,7 +23,7 @@ class EarlyStartTimeDTRBuilder:
     async def get_prediction(self, indoor_temp: float, outdoor_temp: float) -> float:
         try:
             model = load(self.model_path)
-        except FileNotFoundError:
+        except (FileNotFoundError, IsADirectoryError):
             return 0
 
         try:

+ 1 - 1
app/db/session.py

@@ -4,7 +4,7 @@ from sqlalchemy.orm import sessionmaker
 
 from app.core.config import settings
 
-engine = create_engine(settings.SQLALCHEMY_DATABASE_URL, pool_pre_ping=True)
+engine = create_engine(settings.SQLALCHEMY_DATABASE_URL, pool_pre_ping=True, pool_size=90)
 SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
 
 Base = declarative_base()