summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-12 18:38:48 +0300
committerValery Piashchynski <[email protected]>2021-01-12 18:38:48 +0300
commit44b0ad21e0d70e413a62814fb408faa033b0d478 (patch)
treec1baef8db0fb0b2289610d73eb8b5ca7e2eeece3
parentf0f2b1aaf8e4df2ab65c6c47d9183f072ac86841 (diff)
Few improwements
-rwxr-xr-x.rr.yaml1
-rw-r--r--plugins/server/plugin.go7
2 files changed, 6 insertions, 2 deletions
diff --git a/.rr.yaml b/.rr.yaml
index 17132c8a..f4cf6320 100755
--- a/.rr.yaml
+++ b/.rr.yaml
@@ -8,6 +8,7 @@ server:
group: ""
env:
"RR_HTTP": "true"
+ "RR_RPC": "tcp://127.0.0.1:6001"
relay: "pipes"
relayTimeout: "20s"
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: