mirror of https://github.com/maxcnunes/gaper.git
Skip restart from file changes when there is another restart going on
This commit is contained in:
parent
a93d484fb3
commit
a5cac98c13
5
gaper.go
5
gaper.go
|
@ -98,6 +98,11 @@ func run(cfg *Config, chOSSiginal chan os.Signal, builder Builder, runner Runner
|
|||
select {
|
||||
case event := <-watcher.Events():
|
||||
logger.Debug("Detected new changed file:", event)
|
||||
if changeRestart {
|
||||
logger.Debug("Skip restart due to existing on going restart")
|
||||
continue
|
||||
}
|
||||
|
||||
changeRestart = true
|
||||
if err := restart(builder, runner); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue