refresh snapshot only on online boxes

This commit is contained in:
shoopea 2022-06-17 22:07:37 +08:00
parent 23d7d90d20
commit 9594fd7970
2 changed files with 7 additions and 5 deletions

2
app.go
View File

@ -518,8 +518,10 @@ func (a AppConfig) RefreshSnapshot() error {
refreshSnapshot := make(map[string]struct{}) refreshSnapshot := make(map[string]struct{})
for _, v := range a.Sources { for _, v := range a.Sources {
if cfg.Box[v.Box()].online {
refreshSnapshot[v.Box()] = struct{}{} refreshSnapshot[v.Box()] = struct{}{}
} }
}
for _, v := range a.Destinations { for _, v := range a.Destinations {
if cfg.Box[v.Box()].online { if cfg.Box[v.Box()].online {
refreshSnapshot[v.Box()] = struct{}{} refreshSnapshot[v.Box()] = struct{}{}

View File

@ -1,6 +1,6 @@
// Code generated by version.sh (@generated) DO NOT EDIT. // Code generated by version.sh (@generated) DO NOT EDIT.
package main package main
var githash = "28bae81" var githash = "23d7d90"
var buildstamp = "2022-06-17_14:02:53" var buildstamp = "2022-06-17_14:07:22"
var commits = "39" var commits = "40"
var version = "28bae81-b39 - 2022-06-17_14:02:53" var version = "23d7d90-b40 - 2022-06-17_14:07:22"