Add exec type and fix up a few other things

* Add exec type
* Switch erroneous use of fmt to log instead
* Check for edge existence for safety before using
* Avoid recalling etcd channel maker
* Clean up logging output
This commit is contained in:
James Shubin
2016-01-08 04:08:08 -05:00
parent 45ff3b6aa4
commit ea7fd76f93
11 changed files with 492 additions and 44 deletions

View File

@@ -373,7 +373,7 @@ func (g *Graph) FilterGraph(name string, vertices []*Vertex) *Graph {
for k1, x := range g.Adjacency {
for k2, e := range x {
//fmt.Printf("Filter: %v -> %v # %v\n", k1.Name, k2.Name, e.Name)
//log.Printf("Filter: %v -> %v # %v", k1.Name, k2.Name, e.Name)
if Contains(vertices, k1) || Contains(vertices, k2) {
newgraph.AddEdge(k1, k2, e)
}
@@ -548,7 +548,7 @@ func (g *Graph) Start(wg *sync.WaitGroup) { // start or continue
go func(vv *Vertex) {
defer wg.Done()
vv.Type.Watch()
log.Printf("Finish: %v", vv.GetName())
log.Printf("%v[%v]: Exited", vv.GetType(), vv.GetName())
}(v)
}