Skip to content

Commit

Permalink
feat: sets the consistency level (#177)
Browse files Browse the repository at this point in the history
* feat: set log level to debug

* fix: remove debugging

* feat: set consistency leve to LOCAL_QUORAM

* fix: pass consistency to connection setup

Co-authored-by: Rukesh Kapuluru <rukesh.kapuluru@gmail.com>
  • Loading branch information
shubhank-v and Rukesh-Kapuluru committed Jun 9, 2022
1 parent e85da7e commit 74f074c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hip_data_tools/apache/cassandra.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def __init__(self, settings: CassandraConnectionSettings):
username=self._settings.secrets_manager.username,
password=self._settings.secrets_manager.password,
)
self.consistency_level = ConsistencyLevel.LOCAL_QUORUM

def get_cluster(self) -> Cluster:
"""
Expand Down Expand Up @@ -250,6 +251,7 @@ def setup_connection(self, default_keyspace) -> None:
self._settings.cluster_ips,
load_balancing_policy=self._settings.load_balancing_policy,
auth_provider=self._auth,
consistency=self.consistency_level,
port=self._settings.port,
ssl_options=self._settings.ssl_options,
default_keyspace=default_keyspace)
Expand Down

0 comments on commit 74f074c

Please sign in to comment.