product update first test

This commit is contained in:
merdan 2023-05-03 19:50:17 +05:00
parent d0e4ab8a4d
commit d40cb4d8f8
1 changed files with 2 additions and 1 deletions

View File

@ -72,7 +72,7 @@ func main() {
func worker(db *gorm.DB, stopCh <-chan struct{}, updatePeriod time.Duration) {
importer, _ := repositories.ParseImporterInstance(db)
ticker := time.NewTicker(updatePeriod)
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
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))
ticker = time.NewTicker(updatePeriod)
}
}
}