mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
Don't read from app.Version before we initialise it, otherwise we report 'dev' back to the checkpoint service.
This commit is contained in:
10
prog/app.go
10
prog/app.go
@@ -48,6 +48,11 @@ func appMain() {
|
||||
|
||||
defer log.Info("app exiting")
|
||||
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
app.UniqueID = strconv.FormatInt(rand.Int63(), 16)
|
||||
app.Version = version
|
||||
log.Infof("app starting, version %s, ID %s", app.Version, app.UniqueID)
|
||||
|
||||
// Start background version checking
|
||||
checkpoint.CheckInterval(&checkpoint.CheckParams{
|
||||
Product: "scope-app",
|
||||
@@ -61,11 +66,6 @@ func appMain() {
|
||||
}
|
||||
})
|
||||
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
app.UniqueID = strconv.FormatInt(rand.Int63(), 16)
|
||||
app.Version = version
|
||||
log.Infof("app starting, version %s, ID %s", app.Version, app.UniqueID)
|
||||
|
||||
// If user supplied a weave router address, periodically try and register
|
||||
// out IP address in WeaveDNS.
|
||||
if *weaveAddr != "" {
|
||||
|
||||
Reference in New Issue
Block a user