dev 4
This commit is contained in:
@@ -57,6 +57,7 @@ func main() {
|
||||
}
|
||||
scheduler.Start()
|
||||
log.Printf("[INFO] [ZT] 计划任务已启动")
|
||||
|
||||
<-ctx.Done()
|
||||
<-scheduler.Stop().Done()
|
||||
log.Printf("[INFO] [ZT] 停止")
|
||||
@@ -66,7 +67,7 @@ func waitForQMT(ctx context.Context, client *sdk.Client) (*sdk.Assets, []sdk.Pos
|
||||
for {
|
||||
attempt, cancel := context.WithTimeout(ctx, config.HttpTimeOut)
|
||||
assets, assetsErr := client.Assets(attempt)
|
||||
positions, positionsErr := client.Positions(attempt)
|
||||
_, positions, positionsErr := client.Positions(attempt)
|
||||
cancel()
|
||||
if assetsErr == nil && positionsErr == nil {
|
||||
log.Printf("[INFO] [ZT] QMT连接成功: %s", config.Global.QMTBaseURL)
|
||||
|
||||
Reference in New Issue
Block a user