mirror of
https://github.com/beego/bee.git
synced 2024-11-25 20:10:55 +00:00
commit
7bd1e415dd
6
watch.go
6
watch.go
@ -55,7 +55,7 @@ func NewWatcher(paths []string, files []string, isgenerate bool) {
|
|||||||
case e := <-watcher.Events:
|
case e := <-watcher.Events:
|
||||||
isBuild := true
|
isBuild := true
|
||||||
|
|
||||||
if ifStaticFile(e.Name) || conf.EnableReload {
|
if ifStaticFile(e.Name) && conf.EnableReload {
|
||||||
sendReload(e.String())
|
sendReload(e.String())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -82,10 +82,6 @@ func NewWatcher(paths []string, files []string, isgenerate bool) {
|
|||||||
scheduleTime = time.Now().Add(1 * time.Second)
|
scheduleTime = time.Now().Add(1 * time.Second)
|
||||||
time.Sleep(scheduleTime.Sub(time.Now()))
|
time.Sleep(scheduleTime.Sub(time.Now()))
|
||||||
AutoBuild(files, isgenerate)
|
AutoBuild(files, isgenerate)
|
||||||
|
|
||||||
if conf.EnableReload {
|
|
||||||
sendReload(e.String())
|
|
||||||
}
|
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
case err := <-watcher.Errors:
|
case err := <-watcher.Errors:
|
||||||
|
Loading…
Reference in New Issue
Block a user