mirror of
https://github.com/OliveTin/OliveTin
synced 2025-10-30 12:57:06 +00:00
Compare commits
1 Commits
a915a654cb
...
2024.04.21
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca728163e8 |
@@ -35,9 +35,11 @@ func SetupEntityFileWatchers(cfg *config.Config) {
|
||||
}).Debugf("Adding config dir to entity file path")
|
||||
}
|
||||
|
||||
filehelper.WatchFileWrite(p, func(filename string) {
|
||||
go filehelper.WatchFileWrite(p, func(filename string) {
|
||||
loadEntityFile(p, ef.Name)
|
||||
})
|
||||
|
||||
loadEntityFile(p, ef.Name)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@ import (
|
||||
func WatchFilesInDirectory(cfg *config.Config, ex *executor.Executor) {
|
||||
for _, action := range cfg.Actions {
|
||||
for _, dirname := range action.ExecOnFileChangedInDir {
|
||||
filehelper.WatchDirectoryWrite(dirname, func(filename string) {
|
||||
go filehelper.WatchDirectoryWrite(dirname, func(filename string) {
|
||||
scheduleExec(action, cfg, ex, filename)
|
||||
})
|
||||
}
|
||||
|
||||
for _, dirname := range action.ExecOnFileCreatedInDir {
|
||||
filehelper.WatchDirectoryCreate(dirname, func(filename string) {
|
||||
go filehelper.WatchDirectoryCreate(dirname, func(filename string) {
|
||||
scheduleExec(action, cfg, ex, filename)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user