Small updates to async_history_fetch
This commit is contained in:
parent
4c4604f837
commit
a5f90a409c
@ -1254,7 +1254,7 @@ class Exchange:
|
|||||||
data.extend(new_data)
|
data.extend(new_data)
|
||||||
# Sort data again after extending the result - above calls return in "async order"
|
# Sort data again after extending the result - above calls return in "async order"
|
||||||
data = sorted(data, key=lambda x: x[0])
|
data = sorted(data, key=lambda x: x[0])
|
||||||
logger.info("Downloaded data for %s with length %s.", pair, len(data))
|
logger.info(f"Downloaded data for {pair} with length {len(data)}.")
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def refresh_latest_ohlcv(self, pair_list: ListPairsWithTimeframes, *,
|
def refresh_latest_ohlcv(self, pair_list: ListPairsWithTimeframes, *,
|
||||||
|
@ -1568,7 +1568,7 @@ async def test__async_get_historic_ohlcv(default_conf, mocker, caplog, exchange_
|
|||||||
# Monkey-patch async function
|
# Monkey-patch async function
|
||||||
exchange._api_async.fetch_ohlcv = get_mock_coro(ohlcv)
|
exchange._api_async.fetch_ohlcv = get_mock_coro(ohlcv)
|
||||||
|
|
||||||
pair = 'ETH/BTC'
|
pair = 'ETH/USDT'
|
||||||
res = await exchange._async_get_historic_ohlcv(pair, "5m",
|
res = await exchange._async_get_historic_ohlcv(pair, "5m",
|
||||||
1500000000000, is_new_pair=False)
|
1500000000000, is_new_pair=False)
|
||||||
# Call with very old timestamp - causes tons of requests
|
# Call with very old timestamp - causes tons of requests
|
||||||
|
Loading…
Reference in New Issue
Block a user