refactor: Remove session handling in db_connection.py
This commit is contained in:
parent
4cf73e0a69
commit
125273f22b
@ -14,7 +14,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
def create_client():
|
||||
"""
|
||||
Create a ClickHouse client without session management
|
||||
Create a ClickHouse client without any session management
|
||||
"""
|
||||
clickhouse_password = os.getenv("CLICKHOUSE_PASSWORD")
|
||||
if not clickhouse_password:
|
||||
@ -35,15 +35,14 @@ def create_client():
|
||||
secure=True,
|
||||
connect_timeout=10,
|
||||
send_receive_timeout=300,
|
||||
query_limit=0, # No query limit
|
||||
compress=True, # Enable compression
|
||||
query_limit=0,
|
||||
compress=True,
|
||||
settings={
|
||||
'session_check': 0, # Disable session checking
|
||||
'session_id': '0', # Use a static session ID
|
||||
'enable_http_compression': 1, # Enable HTTP compression
|
||||
'database': 'stock_db', # Set default database
|
||||
'max_execution_time': 300, # 5 minute timeout
|
||||
'mutations_sync': 0 # Disable mutations sync
|
||||
'enable_http_compression': 1,
|
||||
'database': 'stock_db',
|
||||
'max_execution_time': 300,
|
||||
'mutations_sync': 0,
|
||||
'use_session_id': 0 # Disable sessions completely
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user