From 9594fd7970ba32f6ad6c3d56db64452314582d0b Mon Sep 17 00:00:00 2001 From: shoopea Date: Fri, 17 Jun 2022 22:07:37 +0800 Subject: [PATCH] refresh snapshot only on online boxes --- app.go | 4 +++- version.go | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app.go b/app.go index 92d4ae4..216b166 100644 --- a/app.go +++ b/app.go @@ -518,7 +518,9 @@ func (a AppConfig) RefreshSnapshot() error { refreshSnapshot := make(map[string]struct{}) for _, v := range a.Sources { - refreshSnapshot[v.Box()] = struct{}{} + if cfg.Box[v.Box()].online { + refreshSnapshot[v.Box()] = struct{}{} + } } for _, v := range a.Destinations { if cfg.Box[v.Box()].online { diff --git a/version.go b/version.go index 79358d5..d7fe4c0 100644 --- a/version.go +++ b/version.go @@ -1,6 +1,6 @@ // Code generated by version.sh (@generated) DO NOT EDIT. package main -var githash = "28bae81" -var buildstamp = "2022-06-17_14:02:53" -var commits = "39" -var version = "28bae81-b39 - 2022-06-17_14:02:53" +var githash = "23d7d90" +var buildstamp = "2022-06-17_14:07:22" +var commits = "40" +var version = "23d7d90-b40 - 2022-06-17_14:07:22"