diff options
Diffstat (limited to 'plugins/factory/tests/plugin_2.go')
-rwxr-xr-x | plugins/factory/tests/plugin_2.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/factory/tests/plugin_2.go b/plugins/factory/tests/plugin_2.go index dbdb065b..9f401bec 100755 --- a/plugins/factory/tests/plugin_2.go +++ b/plugins/factory/tests/plugin_2.go @@ -14,13 +14,11 @@ import ( type Foo2 struct { configProvider config.Provider wf factory.AppFactory - spw factory.Spawner } -func (f *Foo2) Init(p config.Provider, workerFactory factory.AppFactory, spawner factory.Spawner) error { +func (f *Foo2) Init(p config.Provider, workerFactory factory.AppFactory) error { f.configProvider = p f.wf = workerFactory - f.spw = spawner return nil } @@ -34,7 +32,7 @@ func (f *Foo2) Serve() chan error { return errCh } - cmd, err := f.spw.CommandFactory(nil) + cmd, err := f.wf.NewCmdFactory(nil) if err != nil { errCh <- err return errCh @@ -58,16 +56,18 @@ func (f *Foo2) Serve() chan error { _ = w - poolConfig := &roadrunner.Config{ + poolConfig := roadrunner.Config{ NumWorkers: 10, MaxJobs: 100, AllocateTimeout: time.Second * 10, DestroyTimeout: time.Second * 10, - TTL: 1000, - IdleTTL: 1000, - ExecTTL: time.Second * 10, - MaxPoolMemory: 10000, - MaxWorkerMemory: 10000, + Supervisor: roadrunner.SupervisorConfig{ + WatchTick: 60, + TTL: 1000, + IdleTTL: 10, + ExecTTL: time.Second * 10, + MaxWorkerMemory: 1000, + }, } pool, err := f.wf.NewWorkerPool(context.Background(), poolConfig, nil) |