diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/_____/factory.go | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/cmd/_____/factory.go b/cmd/_____/factory.go deleted file mode 100644 index cee962e2..00000000 --- a/cmd/_____/factory.go +++ /dev/null @@ -1,37 +0,0 @@ -package _____ - -import ( - "github.com/spiral/roadrunner" - "os/exec" - "strings" - "time" -) - -// todo: move out -type PoolConfig struct { - Command string - Relay string - - Number uint64 - MaxJobs uint64 - - Timeouts struct { - Construct int - Allocate int - Destroy int - } -} - -func (f *PoolConfig) rrConfig() roadrunner.Config { - return roadrunner.Config{ - NumWorkers: f.Number, - MaxExecutions: f.MaxJobs, - AllocateTimeout: time.Second * time.Duration(f.Timeouts.Allocate), - DestroyTimeout: time.Second * time.Duration(f.Timeouts.Destroy), - } -} - -func (f *PoolConfig) cmd() func() *exec.Cmd { - cmd := strings.Split(f.Command, " ") - return func() *exec.Cmd { return exec.Command(cmd[0], cmd[1:]...) } -} |