mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-27 17:36:23 +02:00
Fixing more Cassandra consistency issues (#488)
* Fixing more Cassandra work * Fix tests
This commit is contained in:
parent
ccaec88a72
commit
85e669c763
23 changed files with 196 additions and 208 deletions
|
|
@ -119,26 +119,16 @@ def get_cassandra_config_from_params(params: dict) -> Tuple[List[str], Optional[
|
|||
"""
|
||||
Extract and resolve Cassandra configuration from a parameters dictionary.
|
||||
|
||||
Handles both old graph_* and new cassandra_* parameter names for backward compatibility.
|
||||
|
||||
Args:
|
||||
params: Dictionary of parameters that may contain Cassandra configuration
|
||||
|
||||
Returns:
|
||||
tuple: (hosts_list, username, password)
|
||||
"""
|
||||
# Check for new parameter names first
|
||||
# Get Cassandra parameters
|
||||
host = params.get('cassandra_host')
|
||||
username = params.get('cassandra_username')
|
||||
password = params.get('cassandra_password')
|
||||
|
||||
# Fall back to old graph_* names for backward compatibility
|
||||
if not host:
|
||||
host = params.get('graph_host')
|
||||
if not username:
|
||||
username = params.get('graph_username', params.get('cassandra_user'))
|
||||
if not password:
|
||||
password = params.get('graph_password')
|
||||
|
||||
# Use resolve function to handle defaults and list conversion
|
||||
return resolve_cassandra_config(host=host, username=username, password=password)
|
||||
Loading…
Add table
Add a link
Reference in a new issue