backend: new parameter to debug inotify
This commit is contained in:
parent
ddd1773777
commit
4bd8d5f93e
@ -71,6 +71,7 @@ func main() {
|
||||
flag.StringVar(&SubmissionDir, "submission", "./submissions", "Base directory where save submissions")
|
||||
flag.StringVar(&TeamsDir, "teams", "./TEAMS", "Base directory where save teams JSON files")
|
||||
flag.StringVar(&fic.FilesDir, "files", "/files", "Request path prefix to reach files")
|
||||
var debugINotify = flag.Bool("debuginotify", false, "Show skipped inotofy events")
|
||||
flag.Parse()
|
||||
|
||||
log.SetPrefix("[backend] ")
|
||||
@ -118,6 +119,8 @@ func main() {
|
||||
}
|
||||
} else if ev.Op & fsnotify.Create == fsnotify.Create {
|
||||
go treat(ev.Name)
|
||||
} else if *debugINotify {
|
||||
log.Println("Skipped event:", ev, "for", ev.Name)
|
||||
}
|
||||
case err := <-watcher.Errors:
|
||||
log.Println("error:", err)
|
||||
|
Loading…
Reference in New Issue
Block a user