Keep a clean look below a share for an hour, so the backup check does not walk the library every 30 s
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
@@ -101,6 +102,9 @@ type Machine struct {
|
||||
// WalkLimit bounds the look for a backup repository below a share.
|
||||
WalkLimit int
|
||||
owners map[string]Owner
|
||||
// clean is when a look below each real path last found no backup repository (LookKept).
|
||||
clean map[string]time.Time
|
||||
cleanMu sync.Mutex
|
||||
}
|
||||
|
||||
// Here is the machine this process runs on.
|
||||
|
||||
Reference in New Issue
Block a user