pgraph: Add debug messages

These two messages in particular make graph analysis easier.
This commit is contained in:
James Shubin
2017-01-25 09:52:34 -05:00
parent 12e0b2d6f7
commit 7e15a9e181

View File

@@ -353,6 +353,9 @@ func (g *Graph) Worker(v *Vertex) error {
// if process started, but no action yet, skip! // if process started, but no action yet, skip!
if v.Res.GetState() == resources.ResStateProcess { if v.Res.GetState() == resources.ResStateProcess {
if g.Flags.Debug {
log.Printf("%s[%s]: Skipped event!", v.Kind(), v.GetName())
}
ev.ACK() // ready for next message ev.ACK() // ready for next message
continue continue
} }
@@ -360,6 +363,9 @@ func (g *Graph) Worker(v *Vertex) error {
// if running, we skip running a new execution! // if running, we skip running a new execution!
// if waiting, we skip running a new execution! // if waiting, we skip running a new execution!
if running || waiting { if running || waiting {
if g.Flags.Debug {
log.Printf("%s[%s]: Playback added!", v.Kind(), v.GetName())
}
playback = true playback = true
ev.ACK() // ready for next message ev.ACK() // ready for next message
continue continue