We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bfce75 commit 3140a73Copy full SHA for 3140a73
1 file changed
generator.go
@@ -78,6 +78,19 @@ func (g *generator) Generate() error {
78
}
79
80
func (g *generator) generateFromSignals() {
81
+ var hasWatcher bool
82
+ for _, config := range g.Configs.Config {
83
+ if config.Watch {
84
+ hasWatcher = true
85
+ break
86
+ }
87
88
+
89
+ // If none of the configs need to watch for events, don't watch for signals either
90
+ if !hasWatcher {
91
+ return
92
93
94
g.wg.Add(1)
95
go func() {
96
defer g.wg.Done()
@@ -163,6 +176,11 @@ func (g *generator) generateFromEvents() {
163
176
var watchers []chan *docker.APIEvents
164
177
165
178
for _, config := range configs.Config {
179
180
+ if !config.Watch {
181
+ continue
182
183
166
184
167
185
168
186
go func(config Config, watcher chan *docker.APIEvents) {
0 commit comments