Revert "offload initial df computation to thread"

This reverts commit f268187e9b.
This commit is contained in:
Matthias
2022-11-26 13:33:54 +01:00
parent 7b0a76fb70
commit fcf13580f1
2 changed files with 1 additions and 45 deletions

View File

@@ -7,7 +7,6 @@ from fastapi.websockets import WebSocket
from pydantic import ValidationError
from freqtrade.enums import RPCMessageType, RPCRequestType
from freqtrade.misc import sync_to_async_iter
from freqtrade.rpc.api_server.api_auth import validate_ws_token
from freqtrade.rpc.api_server.deps import get_message_stream, get_rpc
from freqtrade.rpc.api_server.ws.channel import WebSocketChannel, create_channel
@@ -94,7 +93,7 @@ async def _process_consumer_request(
limit = min(data.get('limit', 1500), 1500) if data else None
# For every pair in the generator, send a separate message
async for message in sync_to_async_iter(rpc._ws_request_analyzed_df(limit)):
for message in rpc._ws_request_analyzed_df(limit):
# Format response
response = WSAnalyzedDFMessage(data=message)
await channel.send(response.dict(exclude_none=True))