mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-11 18:53:54 +00:00
Decrease message throughput
fixes memory leak by queue raising indefinitely
This commit is contained in:
parent
6841bdaa81
commit
19b3669d97
|
@ -198,8 +198,10 @@ class ApiServer(RPCHandler):
|
||||||
logger.debug(f"Found message of type: {message.get('type')}")
|
logger.debug(f"Found message of type: {message.get('type')}")
|
||||||
# Broadcast it
|
# Broadcast it
|
||||||
await self._ws_channel_manager.broadcast(message)
|
await self._ws_channel_manager.broadcast(message)
|
||||||
# Sleep, make this configurable?
|
# Limit messages per sec.
|
||||||
await asyncio.sleep(0.1)
|
# Could cause problems with queue size if too low, and
|
||||||
|
# problems with network traffik if too high.
|
||||||
|
await asyncio.sleep(0.001)
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user