Merge pull request 'dev' (#81) from dev into master
Reviewed-on: freeleaps/freeleaps-service-hub#81
This commit is contained in:
commit
a1155051b5
@ -1,5 +1,4 @@
|
||||
from pydantic_settings import BaseSettings
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class AppSettings(BaseSettings):
|
||||
@ -20,7 +19,8 @@ class AppSettings(BaseSettings):
|
||||
STARROCKS_USER: str = "root"
|
||||
STARROCKS_PASSWORD: str = ""
|
||||
STARROCKS_DATABASE: str = "freeleaps"
|
||||
|
||||
STARROCKS_POOL_RECYCLE: int = 300
|
||||
|
||||
# Prometheus settings
|
||||
PROMETHEUS_ENDPOINT: str = "http://kube-prometheus-stack-prometheus.freeleaps-monitoring-system:9090"
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ class SiteSettings(BaseSettings):
|
||||
ENV: str = "dev"
|
||||
|
||||
SERVER_HOST: str = "localhost"
|
||||
SERVER_PORT: int = 9000
|
||||
SERVER_PORT: int = 8009
|
||||
|
||||
URL: str = "http://localhost"
|
||||
TIME_ZONE: str = "UTC"
|
||||
|
||||
@ -25,8 +25,9 @@ class DatabaseConnectionPool:
|
||||
charset='utf8mb4',
|
||||
autocommit=True,
|
||||
minsize=5, # Minimum number of connections in the pool
|
||||
maxsize=20, # Maximum number of connections in the pool
|
||||
pool_recycle=3600, # Recycle connections after 1 hour
|
||||
maxsize=10, # Maximum number of connections in the pool
|
||||
pool_recycle=app_settings.STARROCKS_POOL_RECYCLE, # Recycle connections after 0.5 hours
|
||||
connect_timeout=30, # Connection timeout in seconds
|
||||
echo=False # Set to True for SQL query logging
|
||||
)
|
||||
await self.module_logger.log_info(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user