Skip to content

Commit dd335d4

Browse files
Prevent getting warning loggings when the streaming channels overflow
* Set warn_on_overflow to False to ignore warnigns * Increase the channel size from 50 to 100 Signed-off-by: camille-bouvy-frequenz <[email protected]>
1 parent 2e97971 commit dd335d4

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ dependencies = [
3131
"entsoe-py >= 0.6.16, < 1",
3232
"frequenz-api-common >= 0.6.3, < 0.7.0",
3333
"grpcio >= 1.66.2, < 2",
34-
"frequenz-channels >= 1.0.0, < 2",
35-
"frequenz-client-base >= 0.8.0, < 0.9.0",
34+
"frequenz-channels >= 1.6.1, < 2",
35+
"frequenz-client-base >= 0.9.0, < 0.10.0",
3636
"frequenz-client-common >= 0.1.0, < 0.3.0",
3737
"frequenz-api-electricity-trading >= 0.2.4, < 1",
3838
"protobuf >= 5.28.0, < 6",

src/frequenz/client/electricity_trading/_client.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
"""Module to define the client class."""
55

6+
# pylint: disable=too-many-lines
7+
68
from __future__ import annotations
79

810
import asyncio
@@ -273,7 +275,9 @@ async def stream_gridpool_orders(
273275
"Error occurred while streaming gridpool orders: %s", e
274276
)
275277
raise
276-
return self._gridpool_orders_streams[stream_key].new_receiver()
278+
return self._gridpool_orders_streams[stream_key].new_receiver(
279+
warn_on_overflow=False, maxsize=100
280+
)
277281

278282
async def stream_gridpool_trades(
279283
# pylint: disable=too-many-arguments, too-many-positional-arguments
@@ -332,7 +336,9 @@ async def stream_gridpool_trades(
332336
"Error occurred while streaming gridpool trades: %s", e
333337
)
334338
raise
335-
return self._gridpool_trades_streams[stream_key].new_receiver()
339+
return self._gridpool_trades_streams[stream_key].new_receiver(
340+
warn_on_overflow=False, maxsize=100
341+
)
336342

337343
async def stream_public_trades(
338344
self,
@@ -382,7 +388,9 @@ async def stream_public_trades(
382388
except grpc.RpcError as e:
383389
_logger.exception("Error occurred while streaming public trades: %s", e)
384390
raise
385-
return self._public_trades_streams[public_trade_filter].new_receiver()
391+
return self._public_trades_streams[public_trade_filter].new_receiver(
392+
warn_on_overflow=False, maxsize=100
393+
)
386394

387395
def validate_params(
388396
# pylint: disable=too-many-arguments, too-many-positional-arguments, too-many-branches

0 commit comments

Comments
 (0)