diff options
author | Valery Piashchynski <[email protected]> | 2021-01-12 18:38:48 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-01-12 18:38:48 +0300 |
commit | 44b0ad21e0d70e413a62814fb408faa033b0d478 (patch) | |
tree | c1baef8db0fb0b2289610d73eb8b5ca7e2eeece3 /plugins/server/plugin.go | |
parent | f0f2b1aaf8e4df2ab65c6c47d9183f072ac86841 (diff) |
Few improwements
Diffstat (limited to 'plugins/server/plugin.go')
-rw-r--r-- | plugins/server/plugin.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go index 8d8a7694..e4c91c9e 100644 --- a/plugins/server/plugin.go +++ b/plugins/server/plugin.go @@ -24,6 +24,9 @@ import ( // PluginName for the server const PluginName = "server" +// RR_RELAY env variable key +const RR_RELAY = "RR_RELAY" //nolint:golint,stylecheck + // Plugin manages worker type Plugin struct { cfg Config @@ -177,7 +180,7 @@ func (server *Plugin) initFactory() (worker.Factory, error) { } func (server *Plugin) setEnv(e Env) []string { - env := append(os.Environ(), fmt.Sprintf("RR_RELAY=%s", server.cfg.Relay)) + env := append(os.Environ(), fmt.Sprintf(RR_RELAY+"=%s", server.cfg.Relay)) for k, v := range e { env = append(env, fmt.Sprintf("%s=%s", strings.ToUpper(k), v)) } @@ -195,7 +198,7 @@ func (server *Plugin) collectPoolLogs(event interface{}) { case events.EventPoolError: server.log.Info("pool error", "error", we.Payload.(error).Error()) case events.EventSupervisorError: - server.log.Info("pool supervizor error", "error", we.Payload.(error).Error()) + server.log.Info("pool supervisor error", "error", we.Payload.(error).Error()) case events.EventTTL: server.log.Info("worker TTL reached", "pid", we.Payload.(worker.BaseProcess).Pid()) case events.EventWorkerConstruct: |