Skip to content

Commit

Permalink
version printing correction
Browse files Browse the repository at this point in the history
  • Loading branch information
idanasulin2706 committed Jul 5, 2023
1 parent 094af25 commit 4c5fe65
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
5 changes: 1 addition & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,7 @@ func runMemphis(s *server.Server) {
go s.KillZombieResources()
// For backward compatibility data from old account to memphis default account
folderName := fmt.Sprintf("%s%s%s", s.Opts().StoreDir, "/jetstream/", server.DEFAULT_GLOBAL_ACCOUNT)
f, err := os.Stat(folderName)
if err != nil {
s.Errorf("Get file info failed: %s", err.Error())
}
f, _ := os.Stat(folderName)
if f != nil {
err = s.MoveResourcesFromOldToNewDefaultAcc()
if err != nil {
Expand Down
4 changes: 3 additions & 1 deletion server/memphis_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"memphis/db"
"memphis/models"
"net/textproto"
"os"
"regexp"
"sort"
"strconv"
Expand Down Expand Up @@ -684,7 +685,8 @@ func (s *Server) AnalyticsToken() string {
}

func (s *Server) MemphisVersion() string {
return VERSION
data, _ := os.ReadFile("version.conf")
return string(data)
}

func (s *Server) RemoveMsg(tenantName string, stationName StationName, msgSeq uint64) error {
Expand Down
3 changes: 2 additions & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ func InitializeMetadataStorage() (db.MetadataStorage, error) {
}
return metadataDb, nil
}

// added by Memphis ***

// NewServer will setup a new server struct after parsing the options.
Expand Down Expand Up @@ -1661,7 +1662,7 @@ func (s *Server) Start() {
opts := s.getOpts()
clusterName := s.ClusterName()

s.Noticef("Version: %s", VERSION)
s.Noticef("Version: %s", s.MemphisVersion())
if clusterName != _EMPTY_ {
s.Noticef(" Cluster: %s", clusterName)
}
Expand Down

0 comments on commit 4c5fe65

Please sign in to comment.