debounce parsing after first event in watch
This commit is contained in:
parent
d64e3055f9
commit
8898362d73
4
utils.go
4
utils.go
@ -23,7 +23,9 @@ func debouncer(interval time.Duration, input chan fsnotify.Event, w IWatchable)
|
||||
if !isResting {
|
||||
// Run the job
|
||||
//log.Debug("Not resting, running job")
|
||||
w.Run()
|
||||
time.AfterFunc(1*time.Second, func() {
|
||||
w.Run()
|
||||
})
|
||||
//log.Debug("Restting timer")
|
||||
timer.Reset(interval)
|
||||
//log.Debug("Is resting now")
|
||||
|
Loading…
Reference in New Issue
Block a user