Skip to content

Commit 7a5c466

Browse files
committed
Allow using None to specify the default retry strategy
This is very useful when forwarding arguments. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 7325c98 commit 7a5c466

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
@@ -67,7 +67,7 @@ def __init__(
6767
self,
6868
grpc_channel: grpc.aio.Channel,
6969
target: str,
70-
retry_strategy: retry.Strategy = retry.LinearBackoff(),
70+
retry_strategy: retry.Strategy | None = None,
7171
) -> None:
7272
"""Initialize the class instance.
7373
@@ -76,7 +76,8 @@ def __init__(
7676
target: server (host:port) to be used for asyncio-supporting gRPC
7777
channel that the client should use to contact the API
7878
retry_strategy: The retry strategy to use to reconnect when the connection
79-
to the streaming method is lost.
79+
to the streaming method is lost. By default a linear backoff strategy
80+
is used.
8081
"""
8182
self.target = target
8283
"""The location (as "host:port") of the microgrid API gRPC server."""

0 commit comments

Comments
 (0)