refactor: remove duplicate scripts + JSON constants + update docs
This commit is contained in:
@@ -19,7 +19,6 @@ from mo_data import read_decisions
|
||||
from mofin_db import get_conn, write_holdings_batch, write_portfolio_summary, write_holding_strategy
|
||||
|
||||
STOCKS_FILE = "/home/hmo/stocks/holding.xls"
|
||||
PORTFOLIO_PATH = "/home/hmo/web-dashboard/data/portfolio.json"
|
||||
DB_PATH = "/home/hmo/web-dashboard/data/mofin.db"
|
||||
|
||||
|
||||
@@ -151,9 +150,6 @@ def main():
|
||||
'updated_at': datetime.now().strftime('%Y-%m-%d %H:%M'),
|
||||
'source': STOCKS_FILE,
|
||||
}
|
||||
# [migrated to DB] — cold backup removed; DB writes below
|
||||
# with open(PORTFOLIO_PATH, 'w') as f:
|
||||
# json.dump(portfolio, f, indent=2, ensure_ascii=False)
|
||||
# DB 写入
|
||||
try:
|
||||
conn = get_conn()
|
||||
|
||||
Reference in New Issue
Block a user