no message
parent
4581b21970
commit
14b902f429
|
@ -191,9 +191,9 @@ func (this *PlanController) FinishUndo(c *gin.Context) {
|
|||
id := c.Param("id")
|
||||
log.Print("finish undo id",id)
|
||||
|
||||
e := db.GetOrm().Exec(fmt.Sprintf("update background.`undo` set done = 1,finish_time='%s' where id = %d",
|
||||
time.Now().Format("2006-01-02 15:04:05"),1)).Error
|
||||
log.Print(fmt.Sprintf("update undo set done = 1,finish_time='%s' where id = %d",time.Now().Format("2006-01-02 15:04:05"),1))
|
||||
e := db.GetOrm().Exec(fmt.Sprintf("update background.`undo` set done = 1,finish_time='%s' where id = %s",
|
||||
time.Now().Format("2006-01-02 15:04:05"),id)).Error
|
||||
log.Print(fmt.Sprintf("update background.`undo` set done = 1,finish_time='%s' where id = %s",time.Now().Format("2006-01-02 15:04:05"),id))
|
||||
if nil != e {
|
||||
logs.Error(e.Error())
|
||||
return
|
||||
|
|
|
@ -98,7 +98,7 @@ func InsertDocToElaticSearch(doc Doc) error {
|
|||
|
||||
func CreateIndexFromMysqlTable(tblname string) error {
|
||||
columns := []Field{}
|
||||
e := db.GetMysqlClient().Query2("describe "+tblname, &columns)
|
||||
e := db.GetMysqlClient().Query2("describe " + tblname, &columns)
|
||||
if nil != e {
|
||||
logger.Debug(e.Error())
|
||||
return e
|
||||
|
@ -163,7 +163,6 @@ func PortDocumentToElasticsearch(tblname string) error {
|
|||
if nil != e {
|
||||
log.Print(e.Error())
|
||||
}
|
||||
log.Print("index not existed , create " + tblname)
|
||||
}
|
||||
} else {
|
||||
props := map[string]interface{}{}
|
||||
|
|
|
@ -80,15 +80,15 @@ func TestReflect(t *testing.T) {
|
|||
}
|
||||
|
||||
// 测试新建索引,查看mapping是否生效
|
||||
// test create new index,and check the mapping works
|
||||
func TestCreateIndex(t *testing.T) {
|
||||
InitConfig()
|
||||
InitLogs()
|
||||
InitRedisConfig()
|
||||
InitMysql()
|
||||
db.InitELK()
|
||||
InitElasticSearch()
|
||||
}
|
||||
// // test create new index,and check the mapping works
|
||||
// func TestCreateIndex(t *testing.T) {
|
||||
// InitConfig()
|
||||
// InitLogs()
|
||||
// InitRedisConfig()
|
||||
// InitMysql()
|
||||
// db.InitELK()
|
||||
// InitElasticSearch()
|
||||
// }
|
||||
|
||||
// 测试query doc
|
||||
// test doc query works
|
||||
|
|
Loading…
Reference in New Issue