feat: capture wallet_history_date
This commit is contained in:
@@ -23,6 +23,7 @@ KeyStoreKeys = Literal[
|
||||
"startup_time",
|
||||
"binance_migration",
|
||||
"wallet_history_migration",
|
||||
"wallet_history_migration_date",
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ def _migrate_wallet_history(config: Config, exchange: Exchange):
|
||||
# Use bulk_save_objects for better performance
|
||||
WalletBalance.session.bulk_save_objects(wallet_entries)
|
||||
WalletBalance.session.commit()
|
||||
KeyValueStore.store_value("wallet_history_migration_date", dt_now())
|
||||
print(f"Successfully created {len(wallet_entries)} wallet balance records")
|
||||
except Exception as e:
|
||||
WalletBalance.session.rollback()
|
||||
|
||||
Reference in New Issue
Block a user