Skip to content

Commit ad8f510

Browse files
author
Ryan Mitchell
committed
修正 MySQL 示例 storage 類型並啟用 mysql+空 path 時存儲(3.105.0-rc11)
Made-with: Cursor
1 parent 084a513 commit ad8f510

5 files changed

Lines changed: 18 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
所有重要的專案更新都會記錄在此檔案中。
44

5+
## [3.105.0-rc11] - 2026-04-21
6+
7+
### Fixed
8+
- **配置**`storage.type: mysql`**`path` 留空**(依 `database.dsn`)時,預設 **`storage.enabled: true`**,避免誤以為未啟用存儲。
9+
- **文檔**`docs/config/examples/config-mysql8-example.yaml`**`storage.type` 誤寫為 `database`**,已改為 **`mysql`** 並註明與 `database.dsn` 的關係。
10+
11+
---
12+
513
## [3.105.0-rc10] - 2026-04-21
614

715
### Fixed

config/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,6 +2748,10 @@ func (c *Config) Validate() error {
27482748
if c.Storage.Path != "" && c.Storage.Type != "" {
27492749
c.Storage.Enabled = true
27502750
}
2751+
// MySQL 時 path 常留空(由 database.dsn 解析),仍應啟用存儲
2752+
if c.Storage.Type == "mysql" && strings.TrimSpace(c.Database.DSN) != "" {
2753+
c.Storage.Enabled = true
2754+
}
27512755
if c.Storage.BufferSize <= 0 {
27522756
c.Storage.BufferSize = 1000 // 預設 1000
27532757
}

docs/config/examples/config-mysql8-example.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,13 @@ risk_control:
127127
max_leverage: 10
128128

129129
# ============================================
130-
# 存储配置
130+
# 存储配置(與 database 一致使用 MySQL;網格成交寫入 qm_paired_trades,避免與 GORM trades 衝突)
131+
# path 可填完整 MySQL DSN,或留空則使用上方 database.dsn
131132
# ============================================
132133
storage:
133134
enabled: true
134-
type: "database" # 使用 MySQL 数据库存储
135+
type: "mysql"
136+
path: "" # 留空則 resolveMySQLStorageDSN 使用 database.dsn
135137
buffer_size: 1000
136138
batch_size: 100
137139
flush_interval: 10

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import (
4545
)
4646

4747
// Version 应用版本号
48-
var Version = "3.105.0-rc10"
48+
var Version = "3.105.0-rc11"
4949

5050
// capitalDataSourceAdapter 资金數據源适配器
5151
type capitalDataSourceAdapter struct {

webui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "quantmesh-webui",
3-
"version": "3.105.0-rc10",
3+
"version": "3.105.0-rc11",
44
"type": "module",
55
"packageManager": "yarn@4.12.0",
66
"scripts": {

0 commit comments

Comments
 (0)