Unit and chain banks

This commit is contained in:
2015-02-11 19:27:51 +07:00
parent c96bc7ad8f
commit 9e472cc9a3
7 changed files with 117 additions and 89 deletions
+2 -4
View File
@@ -5,8 +5,6 @@ import (
"os"
"os/exec"
"time"
"github.com/localhots/yeast/unit"
)
type (
@@ -14,8 +12,8 @@ type (
)
// XXX: We're about to spawn hundreds of Python processes
func (s *Supervisor) StartAll() {
for _, name := range unit.Units() {
func (s *Supervisor) StartAll(units []string) {
for _, name := range units {
s.Start(name)
time.Sleep(500 * time.Millisecond) // Don't spawn processes too fast
}