resources: Update state checks
The mgmt graph depends on state tracking to eliminate redundant pokes. With the Watch loop now able to produce events quickly, it should no longer play a part in determining the vertex state. This simplifies the resource API as well!
This commit is contained in:
@@ -170,7 +170,6 @@ func (obj *FileRes) Watch(processChan chan *event.Event) error {
|
||||
log.Printf("%s[%s]: Watching: %s", obj.Kind(), obj.GetName(), obj.Path) // attempting to watch...
|
||||
}
|
||||
|
||||
obj.SetState(ResStateWatching) // reset
|
||||
select {
|
||||
case event, ok := <-obj.recWatcher.Events():
|
||||
if !ok { // channel shutdown
|
||||
|
||||
Reference in New Issue
Block a user