Rename persistence.init to init_db

This commit is contained in:
Matthias
2020-10-16 07:39:12 +02:00
parent ec713ff5ae
commit 8cdc795a44
11 changed files with 35 additions and 37 deletions

View File

@@ -9,10 +9,9 @@ from typing import Any, Dict, Optional, Tuple, Union
import numpy as np
import pandas as pd
from freqtrade import persistence
from freqtrade.constants import LAST_BT_RESULT_FN
from freqtrade.misc import json_load
from freqtrade.persistence import Trade
from freqtrade.persistence import Trade, init_db
logger = logging.getLogger(__name__)
@@ -218,7 +217,7 @@ def load_trades_from_db(db_url: str, strategy: Optional[str] = None) -> pd.DataF
Can also serve as protection to load the correct result.
:return: Dataframe containing Trades
"""
persistence.init(db_url, clean_open_orders=False)
init_db(db_url, clean_open_orders=False)
columns = ["pair", "open_date", "close_date", "profit", "profit_percent",
"open_rate", "close_rate", "amount", "trade_duration", "sell_reason",