Skip to content

Commit c442876

Browse files
committed
cloud config connect timeout to 120
1 parent 2cb9ee3 commit c442876

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

impl/astra_vector.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from cassandra.query import (
2323
UNSET_VALUE,
2424
SimpleStatement,
25-
ValueSequence,
2625
dict_factory,
2726
named_tuple_factory, PreparedStatement,
2827
)
@@ -146,7 +145,6 @@ async def async_setup(self):
146145
if self.dbid is None:
147146
await self.get_or_create_db()
148147

149-
# Attempt to connect synchronously (assuming connect is a sync method)
150148
session = self.connect()
151149
if session:
152150
self.session: Session = session
@@ -337,7 +335,7 @@ def connect(self, retry=False) -> Session:
337335
with open(bundlepath, "wb") as f:
338336
f.write(r.content)
339337
# Connect to the cluster
340-
cloud_config = {"secure_connect_bundle": bundlepath}
338+
cloud_config = {"secure_connect_bundle": bundlepath, "connect_timeout": 120}
341339
auth_provider = PlainTextAuthProvider(CASSANDRA_USER, token)
342340
cluster = Cluster(
343341
cloud=cloud_config,

0 commit comments

Comments
 (0)