Browse Source

forbid runOnPublish when source is not record (#143)

pull/169/head
aler9 5 years ago
parent
commit
40c2eb3da2
  1. 4
      internal/conf/pathconf.go

4
internal/conf/pathconf.go

@ -218,6 +218,10 @@ func (pconf *PathConf) fillAndCheck(name string) error {
return fmt.Errorf("a path with a regular expression does not support option 'runOnInit'; use another path") return fmt.Errorf("a path with a regular expression does not support option 'runOnInit'; use another path")
} }
if pconf.RunOnPublish != "" && pconf.Source != "record" {
return fmt.Errorf("'runOnPublish' is useless when source is not 'record', since the stream is not provided by a publisher, but by another source")
}
if pconf.RunOnDemandStartTimeout == 0 { if pconf.RunOnDemandStartTimeout == 0 {
pconf.RunOnDemandStartTimeout = 10 * time.Second pconf.RunOnDemandStartTimeout = 10 * time.Second
} }

Loading…
Cancel
Save