codeskyblue / gosuv

Deprecated!!! Process managerment writtern by golang, inspired by python-supervisor
MIT License
646 stars 181 forks source link

how does this resolve dependency problems in Supervisor/supervisor#122 #27

Open c0b opened 7 years ago

c0b commented 7 years ago

I found this from your comment https://github.com/Supervisor/supervisor/issues/122#issuecomment-243020365 but I have read almost all code here, wonder how does this resolve Supervisor/supervisor#122

https://github.com/codeskyblue/gosuv/blob/master/fsm.go#L107-L130 from the state machine definition I don't see how can dependencies between programs can be defined?

type Program struct {
    Name          string   `yaml:"name" json:"name"`
    Command       string   `yaml:"command" json:"command"`
    Environ       []string `yaml:"environ" json:"environ"`
    Dir           string   `yaml:"directory" json:"directory"`
    StartAuto     bool     `yaml:"start_auto" json:"startAuto"`
    StartRetries  int      `yaml:"start_retries" json:"startRetries"`
    StartSeconds  int      `yaml:"start_seconds,omitempty" json:"startSeconds"`
    StopTimeout   int      `yaml:"stop_timeout,omitempty" json:"stopTimeout"`
    User          string   `yaml:"user,omitempty" json:"user"`
[...]
codeskyblue commented 7 years ago

That's because I did not fix the dependencies issues. Use a stupid method now "sleep 2 && do_realy_things"