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():
|
def create_client():
|
||||||
"""
|
"""
|
||||||
Create a ClickHouse client without session management
|
Create a ClickHouse client without any session management
|
||||||
"""
|
"""
|
||||||
clickhouse_password = os.getenv("CLICKHOUSE_PASSWORD")
|
clickhouse_password = os.getenv("CLICKHOUSE_PASSWORD")
|
||||||
if not clickhouse_password:
|
if not clickhouse_password:
|
||||||
@ -35,15 +35,14 @@ def create_client():
|
|||||||
secure=True,
|
secure=True,
|
||||||
connect_timeout=10,
|
connect_timeout=10,
|
||||||
send_receive_timeout=300,
|
send_receive_timeout=300,
|
||||||
query_limit=0, # No query limit
|
query_limit=0,
|
||||||
compress=True, # Enable compression
|
compress=True,
|
||||||
settings={
|
settings={
|
||||||
'session_check': 0, # Disable session checking
|
'enable_http_compression': 1,
|
||||||
'session_id': '0', # Use a static session ID
|
'database': 'stock_db',
|
||||||
'enable_http_compression': 1, # Enable HTTP compression
|
'max_execution_time': 300,
|
||||||
'database': 'stock_db', # Set default database
|
'mutations_sync': 0,
|
||||||
'max_execution_time': 300, # 5 minute timeout
|
'use_session_id': 0 # Disable sessions completely
|
||||||
'mutations_sync': 0 # Disable mutations sync
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user