Skip to content

Commit b83979a

Browse files
authored
Allow using None to specify the default retry strategy (#46)
This is very useful when forwarding arguments.
2 parents e2444b4 + 7a5c466 commit b83979a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/frequenz/client/microgrid/_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__(
6868
self,
6969
grpc_channel: grpc.aio.Channel,
7070
target: str,
71-
retry_strategy: retry.Strategy = retry.LinearBackoff(),
71+
retry_strategy: retry.Strategy | None = None,
7272
) -> None:
7373
"""Initialize the class instance.
7474
@@ -77,7 +77,8 @@ def __init__(
7777
target: server (host:port) to be used for asyncio-supporting gRPC
7878
channel that the client should use to contact the API
7979
retry_strategy: The retry strategy to use to reconnect when the connection
80-
to the streaming method is lost.
80+
to the streaming method is lost. By default a linear backoff strategy
81+
is used.
8182
"""
8283
self.target = target
8384
"""The location (as "host:port") of the microgrid API gRPC server."""

0 commit comments

Comments
 (0)