Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
barshaul committed Jul 8, 2024
1 parent f39feef commit d20e22b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/python/cluster_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
async def create_client(
host: str = "localhost", port: int = 6379
) -> GlideClusterClient:
# When in Redis is cluster mode, add address of any nodes, and the client will find all nodes in the cluster.
# In cluster mode, add the address of any node; the client will automatically discover all nodes in the cluster.
addresses = [NodeAddress(host, port)]
# Check `GlideClusterClientConfiguration` for additional options.
config = GlideClusterClientConfiguration(
addresses=addresses,
client_name="test_cluster_client",
# if the cluster nodes use TLS, you'll need to enable it. Otherwise the connection attempt will time out silently.
# Enable this field if the servers are configured with TLS.
# use_tls=True
)
return await GlideClusterClient.create(config)
Expand Down
8 changes: 7 additions & 1 deletion examples/python/standalone_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@


async def create_client(host: str = "localhost", port: int = 6379) -> GlideClient:
# Replicas can be added to the addresses list
addresses = [NodeAddress(host, port)]
config = GlideClientConfiguration(addresses)
# Check `GlideClientConfiguration` for additional options.
config = GlideClientConfiguration(
addresses,
# Enable this field if the servers are configured with TLS.
# use_tls=True
)
return await GlideClient.create(config)


Expand Down

0 comments on commit d20e22b

Please sign in to comment.