resources: Don't dirty resource when poked with activity
When we receive a poke with the activity flag set it probably means we are receiving a refresh notification. This doesn't necessarily mean that the resource state should be dirty as a result, in particular if the resource doesn't support refreshing. As a result, don't automatically mark it as dirty. (The engine knows not to skip the CheckApply when the refresh flag is set!)
This commit is contained in:
@@ -60,8 +60,8 @@ func (obj *BaseRes) ReadEvent(ev *event.Event) (exit, send bool) {
|
|||||||
var poke bool
|
var poke bool
|
||||||
// ensure that a CheckApply runs by sending with a dirty state...
|
// ensure that a CheckApply runs by sending with a dirty state...
|
||||||
if ev.GetActivity() { // if previous node did work, and we were notified...
|
if ev.GetActivity() { // if previous node did work, and we were notified...
|
||||||
obj.StateOK(false) // dirty
|
//obj.StateOK(false) // not necessarily
|
||||||
poke = true // poke!
|
poke = true // poke!
|
||||||
// XXX: this should be elsewhere in case Watch isn't used (eg: Polling instead...)
|
// XXX: this should be elsewhere in case Watch isn't used (eg: Polling instead...)
|
||||||
// XXX: unless this is used in our "fallback" polling implementation???
|
// XXX: unless this is used in our "fallback" polling implementation???
|
||||||
//obj.SetRefresh(true) // TODO: is this redundant?
|
//obj.SetRefresh(true) // TODO: is this redundant?
|
||||||
|
|||||||
Reference in New Issue
Block a user