diff --git a/event/event_system.go b/event/event_system.go index c84075a..1d0e33d 100755 --- a/event/event_system.go +++ b/event/event_system.go @@ -123,6 +123,7 @@ type Event struct { EventType string Key string Value interface{} + HasUpdated bool } // Listener All Listener should implement this Interface diff --git a/source/manager.go b/source/manager.go index 99b21e8..f13b3f9 100755 --- a/source/manager.go +++ b/source/manager.go @@ -404,6 +404,10 @@ func (m *Manager) updateEvent(e *event.Event) error { if e == nil || e.EventSource == "" || e.Key == "" { return errors.New("nil or invalid event supplied") } + if e.HasUpdated { + openlog.Info(fmt.Sprintf("config update event %+v has been updated", *e)) + return nil + } openlog.Info("config update event received") switch e.EventType { case event.Create, event.Update: @@ -444,6 +448,7 @@ func (m *Manager) updateEvent(e *event.Event) error { } + e.HasUpdated = true return nil }