增加 command -> delayMillSecond 参数

master
dengsgo 2019-01-02 16:14:40 +08:00
parent c1affe1109
commit 7cb0231a1d
3 changed files with 10 additions and 5 deletions

View File

@ -129,7 +129,7 @@ func initWatcher() {
defer watcher.Close()
done := make(chan bool)
taskMan = newTaskMan(2000)
taskMan = newTaskMan(cfg.Command.DelayMillSecond)
go func() {
for {
select {

View File

@ -10,8 +10,7 @@ type FileGirl struct {
ExceptDirs []string `yaml:"exceptDirs"`
}
Command struct {
//BeforeExec string `yaml:"beforeExec"`
Exec []string `yaml:"exec"`
//AfterExec string `yaml:"afterExec"`
Exec []string `yaml:"exec"`
DelayMillSecond int `yaml:"delayMillSecond"`
}
}

8
raw.go
View File

@ -46,7 +46,13 @@ command:
exec:
- go version
- go env
- echo {{file}}
# xx
# (A)(t)(B)A
# BZtZ
#
# 0
delayMillSecond: 1000
`
var firstRunHelp = ` fileboy ?