feat: capture wallet_history_date

This commit is contained in:
Matthias
2025-05-10 16:17:44 +02:00
parent 51cf051fce
commit c7878130f1
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -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()