fix bug
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package a
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
@@ -32,7 +33,13 @@ func GetStockDaily() {
|
||||
reply, err := TushareClient.Daily(params, fields)
|
||||
if err != nil {
|
||||
log.Println("ERROR", "GetStockDaily", err)
|
||||
return
|
||||
continue
|
||||
}
|
||||
|
||||
if len(reply.Data.Items) == 0 {
|
||||
json, _ := json.Marshal(reply)
|
||||
log.Println("ERROR", "GetStockDailyReply", string(json))
|
||||
continue
|
||||
}
|
||||
|
||||
records := make([]*models.StockDaily, 0)
|
||||
@@ -65,7 +72,7 @@ func GetStockDaily() {
|
||||
impl.DBService.CreateInBatches(records, 50)
|
||||
}
|
||||
|
||||
time.Sleep(200 * time.Microsecond)
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user