File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/frequenz/client/electricity_trading Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 2323from frequenz .client .base .streaming import GrpcStreamBroadcaster
2424from frequenz .client .common .pagination import Params
2525from google .protobuf import field_mask_pb2 , struct_pb2
26+ from typing_extensions import override
2627
2728from ._types import (
2829 DeliveryArea ,
@@ -166,6 +167,21 @@ def _create_stub(self) -> None:
166167 stub : Any = ElectricityTradingServiceStub (self .channel )
167168 self ._stub = stub
168169
170+ @override
171+ def connect (self , server_url : str | None = None ) -> None :
172+ """Connect to the server, possibly using a new URL.
173+
174+ If the client is already connected and the URL is the same as the previous URL,
175+ this method does nothing. If you want to force a reconnection, you can call
176+ [disconnect()][frequenz.client.base.client.BaseApiClient.disconnect] first.
177+
178+ Args:
179+ server_url: The URL of the server to connect to. If not provided, the
180+ previously used URL is used.
181+ """
182+ super ().connect (server_url )
183+ self ._create_stub ()
184+
169185 @property
170186 def stub (self ) -> ElectricityTradingServiceAsyncStub :
171187 """
You can’t perform that action at this time.
0 commit comments