Example #1
0
func process(b lpad.Build, state lpad.BuildState) {

	//Ignore architectures we do not care about
	if !archs[b.ArchTag()] {
		return
	}

	//Ignore builds with no SPPH as they are not the most recent
	spph, err := b.CurrentSourcePublicationLink()
	if err != nil {
		return
	}

	save(b, spph)
}
Example #2
0
func save(b lpad.Build, spph lpad.SPPH) {

	url := b.BuildLogURL()

	ftbfsList[url] = false, false

	if stored(url) {
		return
	}

	fmt.Printf("Saving error log for %s %s %s\n", spph.PackageName(), spph.PackageVersion(), b.ArchTag())

	content := getBuildLog(url)

	collection.Upsert(bson.M{"package": spph.PackageName()}, bson.M{"package": spph.PackageName(), "version": spph.PackageVersion(), "url": url, "cause": "other", "content": content, "datecreated": b.DateCreated(), "component": spph.Component()})
}