syncthing debug fix
This commit is contained in:
parent
224742d008
commit
da6f025c7c
13
main.go
13
main.go
@ -17,11 +17,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var ( // flags
|
var ( // flags
|
||||||
FlagSourceDir = envvars.String("SOURCE_PATH", "/video")
|
FlagSourceDir = envvars.String("SOURCE_PATH", "/video")
|
||||||
FlagTargetDir = envvars.String("TARGET_PATH", "/audio")
|
FlagTargetDir = envvars.String("TARGET_PATH", "/audio")
|
||||||
FlagCacheFile = envvars.String("CACHE_FILE", "/hashes.bin")
|
FlagCacheFile = envvars.String("CACHE_FILE", "/hashes.bin")
|
||||||
FlagExcludeFiles = envvars.StringSlice("EXCLUDE_FILES", ":", []string{".songs", ".stversions"})
|
FlagExcludeFiles = envvars.StringSlice("EXCLUDE_FILES", ":", []string{".songs", ".stversions"})
|
||||||
FlagUpdateCacheFileInterval = envvars.Duration("UPDATE_CACHE_FILE_INTERVAL", 10*time.Second)
|
FlagUpdateCacheFileInterval = envvars.Duration("UPDATE_CACHE_FILE_INTERVAL", 10*time.Second)
|
||||||
|
FlagGroupMultipleFileChangesByTime = envvars.Duration("GROUP_FILE_CHANGES_INTERVAL", 10*time.Second)
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@ -57,7 +58,7 @@ func main() {
|
|||||||
return s
|
return s
|
||||||
})
|
})
|
||||||
|
|
||||||
groupedFiles := channel.GroupByTime(files, time.Second, func(events map[string]struct{}, event string) map[string]struct{} {
|
groupedFiles := channel.GroupByTime(files, FlagGroupMultipleFileChangesByTime, func(events map[string]struct{}, event string) map[string]struct{} {
|
||||||
if events == nil {
|
if events == nil {
|
||||||
events = map[string]struct{}{}
|
events = map[string]struct{}{}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user