Ejemplo n.º 1
0
func touchByGithubUpdates(pkgUTs map[string]time.Time) {
	log.Printf("touchByGithubUpdates ...")

	updates, err := gcse.GithubUpdates()
	if err != nil {
		log.Printf("GithubUpdates failed: %v", err)
	}

	log.Printf("%d updates found!", len(updates))

	for pkg, ut := range updates {
		touchPackage(pkg, ut, pkgUTs)
	}
}
Ejemplo n.º 2
0
func touchByGithubUpdates() bool {
	if time.Now().Before(githubUpdatesCrawled.Add(githubUpdatesGap)) {
		return false
	}

	log.Printf("touchByGithubUpdates ...")

	updates, err := gcse.GithubUpdates()
	if err != nil {
		log.Printf("GithubUpdates failed: %v", err)
		return false
	}

	log.Printf("%d updates found!", len(updates))

	res := false
	for pkg, ut := range updates {
		if touchPackage(pkg, ut) {
			res = true
		}
	}

	return res
}