importer lcw test
This commit is contained in:
parent
f7e0a9c8fb
commit
5831ed49a5
|
|
@ -54,6 +54,7 @@ func ParseLinkLCW(link string,w http.ResponseWriter) {
|
||||||
}
|
}
|
||||||
//wait until initialization data is loaded to memory
|
//wait until initialization data is loaded to memory
|
||||||
importRepo.ImportWGroup.Wait()
|
importRepo.ImportWGroup.Wait()
|
||||||
|
fmt.Println(product);
|
||||||
|
|
||||||
if err = importRepo.UpdateOrCreate(product).Error; err != nil {
|
if err = importRepo.UpdateOrCreate(product).Error; err != nil {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ func ImporterInstance() (instance *Importer, err error) {
|
||||||
go func(db *gorm.DB) {
|
go func(db *gorm.DB) {
|
||||||
defer instance.ImportWGroup.Done()
|
defer instance.ImportWGroup.Done()
|
||||||
instance.mainCategories, instance.Error = gm.GetMainCategories(db)
|
instance.mainCategories, instance.Error = gm.GetMainCategories(db)
|
||||||
log.Println(instance.mainCategories)
|
|
||||||
}(db)
|
}(db)
|
||||||
|
|
||||||
//load families to memory
|
//load families to memory
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue