Exemple #1
0
func (this *Collied) SheepReload(conf *process.Config) error {
	conf.Expand(this.conf.ProcessModel)
	if err := this.SheepDel(conf.Name); err != nil {
		return nil
	}
	return this.SheepAdd(conf)
}
Exemple #2
0
func (this *Collied) SheepAdd(conf *process.Config) error {
	conf.Expand(this.conf.ProcessModel)

	var sheep = process.NewSheep()
	var err = sheep.Create(conf)
	if err != nil {
		return err
	}

	this.sheeps[sheep.Name] = sheep
	return nil
}