summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-02-10 20:00:22 +0300
committerValery Piashchynski <[email protected]>2021-02-10 20:00:22 +0300
commitae3dd0c3672217be0b3fb4042ef650477fba108b (patch)
treeda5b08308e5aff50a102f41e254ee3620d41550e /plugins
parentda64d9fbab7d73e203e7dbbb9503f4d422feaab0 (diff)
Rewrite container for the workers
Update tests
Diffstat (limited to 'plugins')
-rw-r--r--plugins/http/config/http.go2
-rw-r--r--plugins/server/plugin.go12
2 files changed, 8 insertions, 6 deletions
diff --git a/plugins/http/config/http.go b/plugins/http/config/http.go
index bfbc1af6..022476e2 100644
--- a/plugins/http/config/http.go
+++ b/plugins/http/config/http.go
@@ -73,7 +73,7 @@ func (c *HTTP) InitDefaults() error {
c.Pool = &poolImpl.Config{
Debug: false,
NumWorkers: uint64(runtime.NumCPU()),
- MaxJobs: 1000,
+ MaxJobs: 0,
AllocateTimeout: time.Second * 60,
DestroyTimeout: time.Second * 60,
Supervisor: nil,
diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go
index 3fc77926..95e593b8 100644
--- a/plugins/server/plugin.go
+++ b/plugins/server/plugin.go
@@ -49,11 +49,6 @@ func (server *Plugin) Init(cfg config.Configurer, log logger.Logger) error {
server.cfg.InitDefaults()
server.log = log
- server.factory, err = server.initFactory()
- if err != nil {
- return errors.E(op, err)
- }
-
return nil
}
@@ -64,7 +59,14 @@ func (server *Plugin) Name() string {
// Serve (Start) server plugin (just a mock here to satisfy interface)
func (server *Plugin) Serve() chan error {
+ const op = errors.Op("server_plugin_serve")
errCh := make(chan error, 1)
+ var err error
+ server.factory, err = server.initFactory()
+ if err != nil {
+ errCh <- errors.E(op, err)
+ return errCh
+ }
return errCh
}