pgraph: Remove unnecessary indentation in Process code path
We can indent the simple BackPoke code path instead!
This commit is contained in:
@@ -164,7 +164,12 @@ func (g *Graph) Process(v *Vertex) error {
|
||||
// is it okay to run dependency wise right now?
|
||||
// if not, that's okay because when the dependency runs, it will poke
|
||||
// us back and we will run if needed then!
|
||||
if g.OKTimestamp(v) {
|
||||
if !g.OKTimestamp(v) {
|
||||
go g.BackPoke(v)
|
||||
return nil
|
||||
}
|
||||
// timestamp must be okay...
|
||||
|
||||
if g.Flags.Debug {
|
||||
log.Printf("%s[%s]: OKTimestamp(%v)", obj.Kind(), obj.GetName(), v.GetTimestamp())
|
||||
}
|
||||
@@ -285,10 +290,6 @@ func (g *Graph) Process(v *Vertex) error {
|
||||
// poke at our pre-req's instead since they need to refresh/run...
|
||||
return errwrap.Wrapf(err, "could not Process() successfully")
|
||||
}
|
||||
// else... only poke at the pre-req's that need to run
|
||||
go g.BackPoke(v)
|
||||
return nil
|
||||
}
|
||||
|
||||
// SentinelErr is a sentinal as an error type that wraps an arbitrary error.
|
||||
type SentinelErr struct {
|
||||
|
||||
Reference in New Issue
Block a user