diff options
author | Valery Piashchynski <[email protected]> | 2020-11-25 23:11:35 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-11-25 23:11:35 +0300 |
commit | dd224cf8616d2196150fb7a64397eb1a9567e11b (patch) | |
tree | c220ccbd908c78bfb682ef23af35c68e109f6752 /plugins/http/plugin.go | |
parent | 1b0b033bcf4969e401b0c34b82171aa0b60b12cf (diff) |
Finish tests for the http plugin
Diffstat (limited to 'plugins/http/plugin.go')
-rw-r--r-- | plugins/http/plugin.go | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/plugins/http/plugin.go b/plugins/http/plugin.go index 78179242..7ce3a70d 100644 --- a/plugins/http/plugin.go +++ b/plugins/http/plugin.go @@ -92,10 +92,6 @@ func (s *Plugin) Init(cfg config.Configurer, log log.Logger, server factory.Serv return errors.E(op, errors.Disabled) } - // Set needed env vars - env := make(map[string]string) - env["RR_HTTP"] = "true" - s.pool, err = server.NewWorkerPool(context.Background(), roadrunner.PoolConfig{ Debug: s.cfg.Pool.Debug, NumWorkers: s.cfg.Pool.NumWorkers, @@ -103,7 +99,7 @@ func (s *Plugin) Init(cfg config.Configurer, log log.Logger, server factory.Serv AllocateTimeout: s.cfg.Pool.AllocateTimeout, DestroyTimeout: s.cfg.Pool.DestroyTimeout, Supervisor: s.cfg.Pool.Supervisor, - }, env) + }, s.cfg.Env) if err != nil { return errors.E(op, err) } @@ -297,13 +293,8 @@ func (s *Plugin) Reset() error { s.log.Info("Resetting http plugin") s.pool.Destroy(context.Background()) - // Set needed env vars - env := make(map[string]string) - env["RR_HTTP"] = "true" - var err error - // re-read the config - err = s.configurer.UnmarshalKey(ServiceName, &s.cfg) + err := s.configurer.UnmarshalKey(ServiceName, &s.cfg) if err != nil { return errors.E(op, err) } @@ -315,7 +306,7 @@ func (s *Plugin) Reset() error { AllocateTimeout: s.cfg.Pool.AllocateTimeout, DestroyTimeout: s.cfg.Pool.DestroyTimeout, Supervisor: s.cfg.Pool.Supervisor, - }, env) + }, s.cfg.Env) if err != nil { return errors.E(op, err) } |