package services

import (
	"eta/eta_data_init/utils"
	"fmt"
	"time"
)

var IndexSourceMap map[string]int

func Task() {
	fmt.Println("task start")
	//path, err := filepath.Abs(os.Args[0])
	//if err != nil {
	//	fmt.Println(err)
	//}
	//
	//dir := filepath.Dir(path)
	//fmt.Println(dir)

	IndexSourceMap = make(map[string]int)
	IndexSourceMap["ths"] = utils.DATA_SOURCE_THS
	IndexSourceMap["wind"] = utils.DATA_SOURCE_WIND
	IndexSourceMap["钢联"] = utils.DATA_SOURCE_MYSTEEL_CHEMICAL

	time.Sleep(3 * time.Second)

	fmt.Println("start InitCalculateIndex")
	InitBaseIndexDataFromMysteel()
	fmt.Println("end InitCalculateIndex")

	fmt.Println("task end")
}
