diff --git a/models/esTable.go b/models/esTable.go index 52ae376..68804d8 100644 --- a/models/esTable.go +++ b/models/esTable.go @@ -1,15 +1,15 @@ package models const ( - ESInfoVideoTable = "51dj_video_info" - ESMediaTable = "51dj_media_info" - ESInfoTagTable = "51dj_tag_info" - ESInfoUserTable = "51dj_user_info" - ESInfoLouFengTable = "51dj_loufeng_info" - ESInfoFictionTable = "51dj_fiction_info" - ESInfoAudioBookTable = "51dj_audiobook" + ESInfoVideoTable = "hjsq_video_info" + ESMediaTable = "hjsq_media_info" + ESInfoTagTable = "hjsq_tag_info" + ESInfoUserTable = "hjsq_user_info" + ESInfoLouFengTable = "hjsq_loufeng_info" + ESInfoFictionTable = "hjsq_fiction_info" + ESInfoAudioBookTable = "hjsq_audiobook" - ESLogSearchLogTable = "51dj_search_log" + ESLogSearchLogTable = "hjsq_search_log" - ESStatKeywordTable = "51dj_keyword_stat" + ESStatKeywordTable = "hjsq_keyword_stat" ) diff --git a/skd/once/syncAudioBook.go b/skd/once/syncAudioBook.go index 7e11f5c..917d977 100644 --- a/skd/once/syncAudioBook.go +++ b/skd/once/syncAudioBook.go @@ -21,6 +21,9 @@ func syncAudioBook(wg *sync.WaitGroup) { if err != nil { panic(err) } + if len(au) == 0 { + break + } var source = elastic.M{} for i := range au { tmp := au[i] diff --git a/skd/once/syncFiction.go b/skd/once/syncFiction.go index 6839fb0..11165a7 100644 --- a/skd/once/syncFiction.go +++ b/skd/once/syncFiction.go @@ -21,6 +21,9 @@ func syncFiction(wg *sync.WaitGroup) { if err != nil { panic(err) } + if len(fc) == 0 { + break + } var source = elastic.M{} for i := range fc { tmp := fc[i] diff --git a/skd/once/syncVideoInfo.go b/skd/once/syncVideoInfo.go index a542787..2b5dd12 100644 --- a/skd/once/syncVideoInfo.go +++ b/skd/once/syncVideoInfo.go @@ -21,6 +21,9 @@ func syncVideoInfo(wg *sync.WaitGroup) { if err != nil { panic(err) } + if len(vd) == 0 { + break + } var source = elastic.M{} for i := range vd { tmp := vd[i]