only record rusage if build was successful
This commit is contained in:
parent
ece8c4c7d9
commit
cf4f91295f
@ -220,7 +220,6 @@ func (b *BuildManager) buildQueue(queue []*ProtoPackage, ctx context.Context) er
|
||||
unknownBuilds = true
|
||||
}
|
||||
b.buildingLock.RUnlock()
|
||||
up = 0
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -263,11 +263,11 @@ func (p *ProtoPackage) build(ctx context.Context) (time.Duration, error) {
|
||||
SetStatus(dbpackage.StatusFailed).
|
||||
ClearSkipReason().
|
||||
SetBuildTimeStart(start).
|
||||
SetMaxRss(Rusage.Maxrss).
|
||||
SetIoOut(Rusage.Oublock).
|
||||
SetIoIn(Rusage.Inblock).
|
||||
SetUTime(Rusage.Utime.Sec).
|
||||
SetSTime(Rusage.Stime.Sec).
|
||||
ClearMaxRss().
|
||||
ClearIoOut().
|
||||
ClearIoIn().
|
||||
ClearUTime().
|
||||
ClearSTime().
|
||||
SetHash(p.Hash).
|
||||
ExecX(ctx)
|
||||
return time.Since(start), fmt.Errorf("build failed: exit code %d", cmd.ProcessState.ExitCode())
|
||||
|
Loading…
Reference in New Issue
Block a user