package services import ( "context" "eta/eta_task/utils" "fmt" "time" ) // 同步指标 func SyncHzDataIndex(cont context.Context) (err error) { fmt.Println("SyncHzDataIndex start:", time.Now().Format(utils.FormatDateTime)) //郑州交易所 go SyncRankingFromZhengzhou() //if err != nil { // fmt.Println("SyncRankingFromZhengzhou Err:" + err.Error()) // return //} //大商所 //go SyncRankingFromDalian() //if err != nil { // fmt.Println("SyncRankingFromDalian Err:" + err.Error()) // return //} //上期所 go SyncRankingFromShanghai() //if err != nil { // fmt.Println("SyncRankingFromDalian Err:" + err.Error()) // return //} //中金所 go SyncRankingFromCffex() //if err != nil { // fmt.Println("SyncRankingFromCffex Err:" + err.Error()) // return //} //上期能源 go SyncRankingFromIne() //if err != nil { // fmt.Println("SyncRankingFromIne Err:" + err.Error()) // return //} //欧洲天然气 err = SyncRankingFromEic() if err != nil { fmt.Println("SyncRankingFromEic Err:" + err.Error()) return } //谷歌出行数据 err = SyncChangesVisitorsCovid() if err != nil { fmt.Println("SyncChangesVisitorsCovid Err:" + err.Error()) return } // EiaSteo err = SyncEiaSteoClassify() if err != nil { fmt.Println("SyncEiaSteoClassify Err:" + err.Error()) return } err = SyncEiaSteoIndex() if err != nil { fmt.Println("SyncEiaSteoIndex Err:" + err.Error()) return } // UN联合国数据 err = SyncComTradeIndex() if err != nil { fmt.Println("SyncComTradeIndexAndData Err:" + err.Error()) return } // 美联储加息概率 err = SyncMeetingProbabilities() if err != nil { fmt.Println("SyncMeetingProbabilities Err:" + err.Error()) return } //广期所 { //分类信息 err = SyncFromGuangzhouClassify() if err != nil { fmt.Println("SyncFromGuangzhouClassify Err:" + err.Error()) return } //合约信息 err = SyncFromGuangzhouContract() if err != nil { fmt.Println("SyncFromGuangzhouContract Err:" + err.Error()) return } //指标信息 err = SyncFromGuangzhouIndex() if err != nil { fmt.Println("SyncFromGuangzhouIndex Err:" + err.Error()) return } //数据 err = SyncFromGuangzhouTradeData() if err != nil { fmt.Println("SyncFromGuangzhouTradeData Err:" + err.Error()) return } } //ICPI { //分类信息 err = SyncBaseFromIcpiClassify() if err != nil { fmt.Println("SyncBaseFromIcpiClassify Err:" + err.Error()) return } //指标信息 err = SyncBaseFromIcpi() if err != nil { fmt.Println("SyncBaseFromIcpi Err:" + err.Error()) return } err = SyncBaseFromIcpiData() if err != nil { fmt.Println("SyncBaseFromIcpiData Err:" + err.Error()) return } } //美国农业部 { //分类信息 err = SyncBaseFromUsdaFasClassify() if err != nil { fmt.Println("SyncBaseFromUsdaFasClassify Err:" + err.Error()) return } //指标信息 err = SyncBaseFromUsdaFas() if err != nil { fmt.Println("SyncBaseFromUsdaFas Err:" + err.Error()) return } err = SyncBaseFromUsdaFasData() if err != nil { fmt.Println("SyncBaseFromUsdaFasData Err:" + err.Error()) return } } // 同步指标数据 SyncHzDataIndexData() fmt.Println("SyncHzDataIndex end:", time.Now().Format(utils.FormatDateTime)) return err } // SyncHzDataIndexData 同步指标数据 func SyncHzDataIndexData() { var err error //EiaSteo err = SyncEiaSteoIndexDataV2() if err != nil { fmt.Println("SyncEiaSteoIndexData Err:" + err.Error()) return } // 同步un数据 err = SyncComTradeData() if err != nil { fmt.Println("SyncComTradeData Err:" + err.Error()) return } // fmt.Println(err) }