summaryrefslogtreecommitdiff
path: root/plugins/server/plugin.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-12-21 14:24:45 +0300
committerGitHub <[email protected]>2020-12-21 14:24:45 +0300
commit8543980775e5f8b12e5e200a0764052cdb4350a5 (patch)
treec1c6dff8e6bd81bcf51d608c5ed935702911ae81 /plugins/server/plugin.go
parentfd6e9cc403fc0c3857dcf29768429a374bd85636 (diff)
parent7b32b6b93576ec72b4b7fdf2068e655f869e9cf8 (diff)
Merge pull request #453 from spiral/plugin/redis
Plugin/redis
Diffstat (limited to 'plugins/server/plugin.go')
-rw-r--r--plugins/server/plugin.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go
index e6003fbc..580c1e10 100644
--- a/plugins/server/plugin.go
+++ b/plugins/server/plugin.go
@@ -8,6 +8,7 @@ import (
"strings"
"github.com/spiral/errors"
+ config2 "github.com/spiral/roadrunner/v2/interfaces/config"
"github.com/spiral/roadrunner/v2/interfaces/events"
"github.com/spiral/roadrunner/v2/interfaces/log"
"github.com/spiral/roadrunner/v2/interfaces/pool"
@@ -16,7 +17,6 @@ import (
"github.com/spiral/roadrunner/v2/pkg/pipe"
poolImpl "github.com/spiral/roadrunner/v2/pkg/pool"
"github.com/spiral/roadrunner/v2/pkg/socket"
- "github.com/spiral/roadrunner/v2/plugins/config"
"github.com/spiral/roadrunner/v2/util"
)
@@ -30,7 +30,7 @@ type Plugin struct {
}
// Init application provider.
-func (server *Plugin) Init(cfg config.Configurer, log log.Logger) error {
+func (server *Plugin) Init(cfg config2.Configurer, log log.Logger) error {
const op = errors.Op("Init")
err := cfg.UnmarshalKey(PluginName, &server.cfg)
if err != nil {
@@ -62,7 +62,7 @@ func (server *Plugin) Stop() error {
return nil
}
- return server.factory.Close(context.Background())
+ return server.factory.Close()
}
// CmdFactory provides worker command factory assocated with given context.
@@ -105,7 +105,7 @@ func (server *Plugin) NewWorker(ctx context.Context, env server.Env) (worker.Bas
return nil, errors.E(op, err)
}
- w, err := server.factory.SpawnWorkerWithContext(ctx, spawnCmd())
+ w, err := server.factory.SpawnWorkerWithTimeout(ctx, spawnCmd())
if err != nil {
return nil, errors.E(op, err)
}