添加prod环境token
This commit is contained in:
parent
49d675616c
commit
dc25ff389d
BIN
iniDataForLinux
BIN
iniDataForLinux
Binary file not shown.
BIN
iniDataForMacOs
BIN
iniDataForMacOs
Binary file not shown.
17
main.go
17
main.go
@ -53,6 +53,7 @@ func init() {
|
||||
applogger.Info(fmt.Sprintf("程序启动,加载%s环境,尝试执行...", env))
|
||||
go downloadDecompression() // 启动立即执行一次数据下载、处理
|
||||
go queryBatchState()
|
||||
|
||||
}
|
||||
|
||||
func main() {
|
||||
@ -456,7 +457,7 @@ func batchInsert(fileName string, isLastCall bool, excludedFilename string) int
|
||||
//communicationChannelID, _ := strconv.ParseUint(record[0], 10, 32)
|
||||
TargetsMember, _ := strconv.ParseUint(record[2], 10, 32)
|
||||
templateID, _ := strconv.ParseUint(record[3], 10, 32)
|
||||
status := uint(1)
|
||||
status := 1
|
||||
|
||||
t := time.Now()
|
||||
s := t.Format("2006-01-02 15:04:05")
|
||||
@ -900,7 +901,9 @@ func batchDataInsert(fileName string, lastCallKeys map[string]bool, excludedFile
|
||||
|
||||
func queryBatchState() {
|
||||
db, _ := connectToDB()
|
||||
|
||||
//if err := db.AutoMigrate(&Batch{}); err != nil {
|
||||
//applogger.Error(fmt.Sprintf("AutoMigrate,失败%s", err))
|
||||
//}
|
||||
var batches []Batch
|
||||
if err := db.Where("status NOT IN (?)", []int{6, 8}).Find(&batches).Error; err != nil {
|
||||
applogger.Error(fmt.Sprintf("查询批次状态失败:%s", err))
|
||||
@ -928,7 +931,7 @@ func queryBatchState() {
|
||||
fmt.Print("\n")
|
||||
code := int(retobj["code"].(float64))
|
||||
if code == 0 {
|
||||
status := uint(retobj["state"].(float64))
|
||||
status := int(retobj["state"].(float64))
|
||||
if batch.Status != status || status == 5 {
|
||||
fmt.Println(batch)
|
||||
fmt.Print("\n")
|
||||
@ -945,10 +948,10 @@ func queryBatchState() {
|
||||
}
|
||||
if endTime, ok := retobj["startTime"].(string); ok {
|
||||
if endTimeTime, err := time.Parse("2006-01-02 15:04:05", endTime); err == nil {
|
||||
updates["startTime"] = &endTimeTime
|
||||
updates["start_time"] = &endTimeTime
|
||||
}
|
||||
} else {
|
||||
updates["startTime"] = nil
|
||||
updates["start_time"] = nil
|
||||
}
|
||||
if mc, ok := retobj["mc"].(float64); ok {
|
||||
updates["mc"] = int(mc)
|
||||
@ -1103,7 +1106,7 @@ func iniConfi() {
|
||||
goSize = 50 //协程数
|
||||
taskTime = 60
|
||||
to = []string{"chejiulong@wemediacn.com", "xiayujuan@wemediacn.com", "wangyuanbing@wemediacn.com", "tangweiqi@wemediacn.com"}
|
||||
token = "7100477930234217"
|
||||
token = "7100178600777091" //7100477930234217
|
||||
lastCallPath = "RawData/LastCall"
|
||||
verifySignatureKey = "Lzxf6asgwFRTsANZ8gkXJnP3EmOyNO#&"
|
||||
|
||||
@ -1202,7 +1205,7 @@ type Batch struct {
|
||||
Content string `gorm:"type:text"`
|
||||
CreatedAt time.Time `gorm:"default:getdate()"`
|
||||
UpdatedAt time.Time `gorm:"default:getdate()"`
|
||||
Status uint `gorm:"type:int"`
|
||||
Status int `gorm:"column:status"`
|
||||
DataFileName string `gorm:"type:text"`
|
||||
Sid int `gorm:"type:int"`
|
||||
EndTime *time.Time `gorm:"column:end_time"`
|
||||
|
||||
Loading…
Reference in New Issue
Block a user