version.go: remove ORIGIN and reduce frequency of logs
This commit is contained in:
parent
6d00a8e3aa
commit
34e39edcda
@ -14,13 +14,12 @@ func versionCheckStart() error {
|
|||||||
go func() {
|
go func() {
|
||||||
printedError := false
|
printedError := false
|
||||||
errorCount := 0
|
errorCount := 0
|
||||||
|
latestSeen := ""
|
||||||
|
|
||||||
for {
|
for {
|
||||||
time.Sleep(5 * time.Minute)
|
time.Sleep(5 * time.Minute)
|
||||||
|
|
||||||
data := url.Values{
|
data := url.Values{
|
||||||
"origin": {os.Getenv("ORIGIN")},
|
|
||||||
"edition": {edition},
|
|
||||||
"version": {version},
|
"version": {version},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,8 +64,9 @@ func versionCheckStart() error {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.NewUpdate {
|
if r.NewUpdate && r.Latest != latestSeen {
|
||||||
logger.Infof("New update available! Latest version: %s", r.Latest)
|
logger.Infof("New update available! Latest version: %s", r.Latest)
|
||||||
|
latestSeen = r.Latest
|
||||||
}
|
}
|
||||||
|
|
||||||
errorCount = 0
|
errorCount = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user