|
@@ -47,10 +47,6 @@ func Task() {
|
|
|
companyReportPermissionClose := task.NewTask("companyReportPermissionClose", "0 35 2 * * *", CompanyReportPermissionClose)
|
|
|
task.AddTask("用户产品权限试用-->关闭", companyReportPermissionClose)
|
|
|
|
|
|
- //删除日志记录
|
|
|
- //deleteReportSaveLog := task.NewTask("deleteReportSaveLog", "0 30 08 * * *", DeleteReportSaveLog)
|
|
|
- //task.AddTask("deleteReportSaveLog", deleteReportSaveLog)
|
|
|
-
|
|
|
// 存量客户数据统计
|
|
|
stackCompanyStatistic := task.NewTask("stackCompanyStatistic", "0 35 2 * * *", StackCompanyStatistic)
|
|
|
task.AddTask("存量客户数据统计", stackCompanyStatistic)
|
|
@@ -66,11 +62,6 @@ func Task() {
|
|
|
// 研报沙龙提醒
|
|
|
ybSalonRemind := task.NewTask("ybSalonRemind", "0 */1 * * * * ", YbSalonRemind)
|
|
|
task.AddTask("研报沙龙提醒", ybSalonRemind)
|
|
|
- //GetHistoryLzProductDetail()
|
|
|
- //GetLzPrice()
|
|
|
- //GetLzProductDetail()
|
|
|
- //LzExportExcel()
|
|
|
- //GetLzProductList()GetLzProductDetail
|
|
|
|
|
|
// 定时新增手工指标数据提醒
|
|
|
addEdbTask := task.NewTask("sendWaitReport", "1 0 2 * * * ", AddEdbTask)
|
|
@@ -142,9 +133,6 @@ func releaseTask() {
|
|
|
sendEmail := task.NewTask("sendEmail", "0 0 12 * * 0 ", SendEmail)
|
|
|
task.AddTask("sendEmail", sendEmail)
|
|
|
|
|
|
- //oneMinute := task.NewTask("oneMinute", "0 */1 7-23 * * * ", OneMinute)
|
|
|
- //task.AddTask("oneMinute", oneMinute)
|
|
|
-
|
|
|
// 正式/试用 用户到期提醒
|
|
|
companyRemind := task.NewTask("companyRemind", "0 30 08 * * *", CompanyRemind)
|
|
|
task.AddTask("companyRemind", companyRemind)
|
|
@@ -184,19 +172,9 @@ func releaseTask() {
|
|
|
syncThsWxGroupEveryDay := task.NewTask("syncThsWxGroupEveryDay", "0 1 4 * * * ", SyncWxGroupEveryDay)
|
|
|
task.AddTask("定时往同花顺同步微信群的截止日期", syncThsWxGroupEveryDay)
|
|
|
|
|
|
- checkPbDataInterface := task.NewTask("checkPbDataInterface", "0 */2 * * * * ", data.CheckPbDataInterface)
|
|
|
- task.AddTask("checkPbDataInterface", checkPbDataInterface)
|
|
|
-
|
|
|
- checkLtDataInterface := task.NewTask("checkLtDataInterface", "0 */2 * * * * ", data.CheckLtDataInterface)
|
|
|
- task.AddTask("checkLtDataInterface", checkLtDataInterface)
|
|
|
-
|
|
|
- //检测wind新服务器
|
|
|
- checkWindDataInterface := task.NewTask("checkWindDataInterface", "0 */2 * * * * ", data.CheckWindDataInterface)
|
|
|
- task.AddTask("checkWindDataInterface", checkWindDataInterface)
|
|
|
-
|
|
|
- // 检测同花顺数据服务器
|
|
|
- checkThsDataInterface := task.NewTask("checkThsDataInterface", "0 */2 * * * * ", data.CheckThsDataInterface)
|
|
|
- task.AddTask("checkThsDataInterface", checkThsDataInterface)
|
|
|
+ //检测数据服务器
|
|
|
+ checkDataServer := task.NewTask("checkDataServer", "0 */2 * * * * ", checkDataServer)
|
|
|
+ task.AddTask("checkDataServer", checkDataServer)
|
|
|
|
|
|
//初始化指标更新状态
|
|
|
resetEdbInfoIsUpdate := task.NewTask("resetEdbInfoIsUpdate", "0 0 0 * * *", data.ResetEdbInfoIsUpdate)
|
|
@@ -344,30 +322,6 @@ func SyncBaseDataExt(cont context.Context) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-//func RefreshCalculateData(cont context.Context) (err error) {
|
|
|
-// //计算指标
|
|
|
-// go data.RefreshDataFromCalculateAll()
|
|
|
-// //刷新公历转农历数据
|
|
|
-// //go data.RefreshDataFromQuarterAll()
|
|
|
-// return
|
|
|
-//}
|
|
|
-
|
|
|
-//func Task() {
|
|
|
-// fmt.Println("start")
|
|
|
-// data.RefreshDataFromCalculateAll()
|
|
|
-// //startDate := time.Now().AddDate(-30, 0, 0).UnixNano() / 1e6
|
|
|
-//
|
|
|
-// //fmt.Println(startDate)
|
|
|
-// //fmt.Println(endDate)
|
|
|
-// fmt.Println("end")
|
|
|
-//}
|
|
|
-
|
|
|
-/*
|
|
|
-endData:=time.Now().UnixNano()/1e6
|
|
|
- dateTime:=time.Unix(endData/1000,0)
|
|
|
- fmt.Println(dateTime)
|
|
|
-*/
|
|
|
-
|
|
|
// EdbTaskNameMap 手工指标定时任务名称map集合
|
|
|
var EdbTaskNameMap map[string]map[string]bool
|
|
|
|
|
@@ -815,3 +769,16 @@ func deleteTask() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+//检测数据服务
|
|
|
+func checkDataServer(cont context.Context) (err error){
|
|
|
+ //检测wind新服务器
|
|
|
+ go data.CheckWindDataInterface(cont)
|
|
|
+ //检测同花顺数据服务器
|
|
|
+ go data.CheckThsDataInterface(cont)
|
|
|
+ //检测路透数据服务器
|
|
|
+ go data.CheckLtDataInterface(cont)
|
|
|
+ //检测彭博
|
|
|
+ go data.CheckPbDataInterface(cont)
|
|
|
+ return
|
|
|
+}
|