mirror of
https://github.com/woodchen-ink/Q58Bot.git
synced 2025-07-18 05:42:06 +08:00
Localization and enhancement of Binance service logs
This commit is contained in:
parent
112c024bd2
commit
9c116036c9
@ -111,7 +111,7 @@ func sendPriceUpdate() {
|
||||
}
|
||||
|
||||
func RunBinance() {
|
||||
logger.Println("Starting Binance service...")
|
||||
logger.Println("启动币安服务...")
|
||||
|
||||
// 初始化必要的变量
|
||||
botToken = core.BOT_TOKEN
|
||||
@ -122,11 +122,12 @@ func RunBinance() {
|
||||
|
||||
// 初始化并加载所有交易对
|
||||
if err := LoadAllSymbols(); err != nil {
|
||||
logger.Fatalf("Failed to load all trading pairs: %v", err)
|
||||
logger.Fatalf("加载所有交易对失败: %v", err)
|
||||
}
|
||||
|
||||
// 启动每小时刷新交易对缓存
|
||||
go StartSymbolRefresh(1 * time.Hour)
|
||||
logger.Println("启动每小时刷新交易对缓存...")
|
||||
|
||||
// 立即发送一次价格更新
|
||||
sendPriceUpdate()
|
||||
@ -137,7 +138,7 @@ func RunBinance() {
|
||||
for range ticker.C {
|
||||
now := time.Now().In(singaporeTZ)
|
||||
if now.Minute() == 0 {
|
||||
logger.Println("Sending hourly price update...")
|
||||
logger.Println("发送每小时价格更新...")
|
||||
sendPriceUpdate()
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,10 @@ import (
|
||||
)
|
||||
|
||||
func StartScheduledTasks() {
|
||||
log.Printf("启动定时任务")
|
||||
|
||||
go periodicCleanup()
|
||||
log.Printf("过期链接清理任务已启动")
|
||||
}
|
||||
|
||||
func periodicCleanup() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user