PR cleanup
This commit is contained in:
parent
044afdf7af
commit
f374c9da70
@ -569,7 +569,7 @@ optional arguments:
|
|||||||
deployments (default: `sqlite:///tradesv3.sqlite` for
|
deployments (default: `sqlite:///tradesv3.sqlite` for
|
||||||
Live Run mode, `sqlite:///tradesv3.dryrun.sqlite` for
|
Live Run mode, `sqlite:///tradesv3.dryrun.sqlite` for
|
||||||
Dry Run).
|
Dry Run).
|
||||||
--db-url-from PATH Source db url to use when migrating database systems.
|
--db-url-from PATH Source db url to use when migrating a database.
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! Warning
|
!!! Warning
|
||||||
|
@ -108,7 +108,7 @@ AVAILABLE_CLI_OPTIONS = {
|
|||||||
),
|
),
|
||||||
"db_url_from": Arg(
|
"db_url_from": Arg(
|
||||||
'--db-url-from',
|
'--db-url-from',
|
||||||
help='Source db url to use when migrating database systems.',
|
help='Source db url to use when migrating a database.',
|
||||||
metavar='PATH',
|
metavar='PATH',
|
||||||
),
|
),
|
||||||
"sd_notify": Arg(
|
"sd_notify": Arg(
|
||||||
|
@ -5,8 +5,6 @@ from sqlalchemy import func
|
|||||||
|
|
||||||
from freqtrade.configuration.config_setup import setup_utils_configuration
|
from freqtrade.configuration.config_setup import setup_utils_configuration
|
||||||
from freqtrade.enums.runmode import RunMode
|
from freqtrade.enums.runmode import RunMode
|
||||||
from freqtrade.persistence.migrations import set_sequence_ids
|
|
||||||
from freqtrade.persistence.trade_model import Order
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -15,7 +13,8 @@ logger = logging.getLogger(__name__)
|
|||||||
def start_convert_db(args: Dict[str, Any]) -> None:
|
def start_convert_db(args: Dict[str, Any]) -> None:
|
||||||
from sqlalchemy.orm import make_transient
|
from sqlalchemy.orm import make_transient
|
||||||
|
|
||||||
from freqtrade.persistence import Trade, init_db
|
from freqtrade.persistence import Order, Trade, init_db
|
||||||
|
from freqtrade.persistence.migrations import set_sequence_ids
|
||||||
from freqtrade.persistence.pairlock import PairLock
|
from freqtrade.persistence.pairlock import PairLock
|
||||||
|
|
||||||
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
|
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
|
||||||
@ -25,7 +24,6 @@ def start_convert_db(args: Dict[str, Any]) -> None:
|
|||||||
init_db(config['db_url_from'], False)
|
init_db(config['db_url_from'], False)
|
||||||
logger.info("Starting db migration.")
|
logger.info("Starting db migration.")
|
||||||
|
|
||||||
# print(f"{id(sessionA)=}, {id(sessionB)=}")
|
|
||||||
trade_count = 0
|
trade_count = 0
|
||||||
pairlock_count = 0
|
pairlock_count = 0
|
||||||
for trade in Trade.get_trades():
|
for trade in Trade.get_trades():
|
||||||
|
Loading…
Reference in New Issue
Block a user