FlagUpdateHashFileInterval added
This commit is contained in:
parent
55a7cdc36f
commit
45f5c9d06a
@ -29,7 +29,7 @@ func InitCache() {
|
||||
}
|
||||
|
||||
go func() {
|
||||
ticker := time.NewTicker(10 * time.Second)
|
||||
ticker := time.NewTicker(FlagUpdateHashFileInterval)
|
||||
defer ticker.Stop()
|
||||
for range ticker.C {
|
||||
if err := WriteCache(); err != nil {
|
||||
|
1
main.go
1
main.go
@ -20,6 +20,7 @@ var ( // flags
|
||||
FlagSourceDir = envvars.String("SOURCE_PATH", "/video")
|
||||
FlagTargetDir = envvars.String("TARGET_PATH", "/audio")
|
||||
FlagCacheFile = envvars.String("CACHE_FILE", "/hashes.bin")
|
||||
FlagUpdateHashFileInterval = envvars.Duration("UPDATE_CACHE_FILE_INTERVAL", 10*time.Second)
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
Loading…
Reference in New Issue
Block a user