product update first test
This commit is contained in:
parent
d0e4ab8a4d
commit
d40cb4d8f8
3
main.go
3
main.go
|
|
@ -72,7 +72,7 @@ func main() {
|
||||||
func worker(db *gorm.DB, stopCh <-chan struct{}, updatePeriod time.Duration) {
|
func worker(db *gorm.DB, stopCh <-chan struct{}, updatePeriod time.Duration) {
|
||||||
importer, _ := repositories.ParseImporterInstance(db)
|
importer, _ := repositories.ParseImporterInstance(db)
|
||||||
|
|
||||||
ticker := time.NewTicker(updatePeriod)
|
ticker := time.NewTicker(time.Second)
|
||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
log.Printf("Updater worker Started")
|
log.Printf("Updater worker Started")
|
||||||
|
|
||||||
|
|
@ -117,6 +117,7 @@ func worker(db *gorm.DB, stopCh <-chan struct{}, updatePeriod time.Duration) {
|
||||||
|
|
||||||
}
|
}
|
||||||
log.Printf("%d Products updated", len(result))
|
log.Printf("%d Products updated", len(result))
|
||||||
|
ticker = time.NewTicker(updatePeriod)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue