Merge pull request 'feat-IRONFANS-134-Robin' (#500) from feat-IRONFANS-134-Robin into main
Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/500
This commit is contained in:
commit
359f1b6322
|
@ -51,7 +51,7 @@ func (es *ElasticSearch) getIndexStreamerAcct() string {
|
|||
func (es *ElasticSearch) CreateStreamerAcct(ctx *gin.Context, streameraccts []*dbstruct.EsStreamerAcct) error {
|
||||
bulk := es.clientMix.Bulk().Index(es.getIndexStreamerAcct()).Refresh("true")
|
||||
for _, streameracct := range streameraccts {
|
||||
bulk.Add(elastic.NewBulkCreateRequest().Doc(streameracct))
|
||||
bulk.Add(elastic.NewBulkCreateRequest().Id(fmt.Sprint(streameracct.Mid)).Doc(streameracct))
|
||||
}
|
||||
_, err := bulk.Do(ctx)
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue