fix bug
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
CacheUrl = "redis://null:Weidong2023~!@139.224.247.176:19379/0"
|
CacheUrl = "redis://null:Weidong2023~!@139.224.247.176:19379/0"
|
||||||
DBSources = []string{"host=139.224.247.176 user=postgres password=Stock0310~! dbname=stock_prod port=19432 sslmode=disable TimeZone=Asia/Shanghai"}
|
DBSources = []string{"host=139.224.247.176 user=postgres password=Stock0310~! dbname=stock_prod port=19432 sslmode=disable"}
|
||||||
RedisService *redis.RedisClient
|
RedisService *redis.RedisClient
|
||||||
DBService *gorm.DB
|
DBService *gorm.DB
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ func Boot(cfg *conf.Config) {
|
|||||||
coll := NewCollector(COLLECTOR_URL)
|
coll := NewCollector(COLLECTOR_URL)
|
||||||
|
|
||||||
// 启动时检查并补全订单簿数据
|
// 启动时检查并补全订单簿数据
|
||||||
CheckAndRepairOrderBooks(cfg.AccountID)
|
// CheckAndRepairOrderBooks(cfg.AccountID)
|
||||||
|
|
||||||
// 创建cron调度器
|
// 创建cron调度器
|
||||||
c := cron.New(cron.WithSeconds())
|
c := cron.New(cron.WithSeconds())
|
||||||
|
|||||||
@@ -108,10 +108,10 @@ func SaveData(status *types.StatusData) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 处理订单簿逻辑
|
// 处理订单簿逻辑
|
||||||
if err := processOrderBook(status.Data.Assets.AccountID, order, ymd, now, open_price); err != nil {
|
// if err := processOrderBook(status.Data.Assets.AccountID, order, ymd, now, open_price); err != nil {
|
||||||
fmt.Printf("处理订单簿失败: %v\n", err)
|
// fmt.Printf("处理订单簿失败: %v\n", err)
|
||||||
// 不返回错误,避免影响主流程
|
// // 不返回错误,避免影响主流程
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user