From 7e15a9e181edd10e0f73ebdb88d1adab8010ae84 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Wed, 25 Jan 2017 09:52:34 -0500 Subject: [PATCH] pgraph: Add debug messages These two messages in particular make graph analysis easier. --- pgraph/actions.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pgraph/actions.go b/pgraph/actions.go index 3c437b4d..2a2bac60 100644 --- a/pgraph/actions.go +++ b/pgraph/actions.go @@ -353,6 +353,9 @@ func (g *Graph) Worker(v *Vertex) error { // if process started, but no action yet, skip! 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 continue } @@ -360,6 +363,9 @@ func (g *Graph) Worker(v *Vertex) error { // if running, we skip running a new execution! // if waiting, we skip running a new execution! if running || waiting { + if g.Flags.Debug { + log.Printf("%s[%s]: Playback added!", v.Kind(), v.GetName()) + } playback = true ev.ACK() // ready for next message continue