Skip to content

Commit

Permalink
disabled config reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
kochetovd committed Apr 9, 2024
1 parent 03d5cf0 commit d005f24
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

const (
ReleemAgentVersion = "1.14.1"
ReleemAgentVersion = "1.14.1.1"
)

type Config struct {
Expand Down
2 changes: 1 addition & 1 deletion current_version_agent
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.14.1
1.14.1.1
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash
# install.sh - Version 1.14.1
# install.sh - Version 1.14.1.1
# (C) Releem, Inc 2022
# All rights reserved

# Releem installation script: install and set up the Releem Agent on supported Linux distributions
# using the package manager.

set -e
install_script_version=1.14.1
install_script_version=1.14.1.1
logfile="releem-install.log"

WORKDIR="/opt/releem"
Expand Down
12 changes: 0 additions & 12 deletions metrics/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,12 @@ func RunWorker(gatherers []MetricsGatherer, gatherers_configuration []MetricsGat
}

logger.Debug(configuration)
configTimer := time.NewTimer(configuration.ReadConfigSeconds * time.Second)
if (Mode.Name == "Configurations" && Mode.ModeType != "default") || Mode.Name == "Events" || Mode.Name == "Task" {
GenerateTimer = time.NewTimer(0 * time.Second)
timer = time.NewTimer(3600 * time.Second)
} else {
GenerateTimer = time.NewTimer(configuration.GenerateConfigSeconds * time.Second)
timer = time.NewTimer(1 * time.Second)

}

terminator := makeTerminateChannel()
Expand All @@ -53,7 +51,6 @@ func RunWorker(gatherers []MetricsGatherer, gatherers_configuration []MetricsGat
logger.Info("Exiting")
os.Exit(0)
case <-timer.C:

timer.Reset(configuration.TimePeriodSeconds * time.Second)
go func() {
defer HandlePanic(configuration, logger)
Expand All @@ -68,15 +65,6 @@ func RunWorker(gatherers []MetricsGatherer, gatherers_configuration []MetricsGat
}
}
}()
case <-configTimer.C:
configTimer.Reset(configuration.ReadConfigSeconds * time.Second)
if newConfig, err := config.LoadConfig(configFile, logger); err != nil {
logger.PrintError("Error reading config", err)
} else {
configuration = newConfig
logger.Debug("LOADED NEW CONFIG", "APIKEY", configuration.GetApiKey())
}

case <-GenerateTimer.C:
GenerateTimer.Reset(configuration.GenerateConfigSeconds * time.Second)
go func() {
Expand Down
4 changes: 2 additions & 2 deletions mysqlconfigurer.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# mysqlconfigurer.sh - Version 1.14.1
# mysqlconfigurer.sh - Version 1.14.1.1
# (C) Releem, Inc 2022
# All rights reserved

Expand All @@ -12,7 +12,7 @@ MYSQLTUNER_REPORT=$MYSQLCONFIGURER_PATH"mysqltunerreport.json"
RELEEM_MYSQL_VERSION=$MYSQLCONFIGURER_PATH"mysql_version"
MYSQLCONFIGURER_CONFIGFILE="${MYSQLCONFIGURER_PATH}${MYSQLCONFIGURER_FILE_NAME}"
MYSQL_MEMORY_LIMIT=0
VERSION="1.14.1"
VERSION="1.14.1.1"
RELEEM_INSTALL_PATH=$MYSQLCONFIGURER_PATH"install.sh"
logfile="releem-mysqlconfigurer.log"

Expand Down

0 comments on commit d005f24

Please sign in to comment.