Add state caching and invalidation to service type

This required a change in the event system to add an "activity" field.
This is meant to be generic in the case that there is more than one need
for it, but at the moment, allows a poke to tell that it is a poke in
response to an apply that just finished, instead of a regular poke or
backpoke in which all that matters is timestamp updates, because there
wasn't any actual work done (since that state was okay).
This commit is contained in:
James Shubin
2016-01-14 23:22:31 -05:00
parent 935805aeda
commit f7858b8e9b
5 changed files with 46 additions and 18 deletions

View File

@@ -205,7 +205,7 @@ func UpdateGraphFromConfig(config *graphConfig, hostname string, g *Graph, etcdO
for _, v := range g.GetVertices() {
if !HasVertex(v, keep) {
// wait for exit before starting new graph!
v.Type.SendEvent(eventExit, true)
v.Type.SendEvent(eventExit, true, false)
g.DeleteVertex(v)
}
}