Skip to content

Commit 62658b3

Browse files
committed
remove debug code
1 parent 33dd17c commit 62658b3

File tree

1 file changed

+3
-4
lines changed
  • internal/component/local/file_match

1 file changed

+3
-4
lines changed

internal/component/local/file_match/file.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ func (c *Component) Run(ctx context.Context) error {
114114
// reset the timer.
115115
c.mut.Lock()
116116
c.watchDog.Reset(c.args.SyncPeriod)
117-
targets := c.getWatchedFiles(true)
117+
targets := c.getWatchedFiles()
118118
c.mut.Unlock()
119119
c.opts.OnStateChange(discovery.Exports{Targets: targets})
120120
case <-c.watchDog.C:
121121
// If we have not received a signal that we have new targets watch job will periodically
122122
// get all files that we should watch.
123123
c.mut.Lock()
124-
targets := c.getWatchedFiles(false)
124+
targets := c.getWatchedFiles()
125125
c.mut.Unlock()
126126
c.opts.OnStateChange(discovery.Exports{Targets: targets})
127127
case <-ctx.Done():
@@ -130,7 +130,7 @@ func (c *Component) Run(ctx context.Context) error {
130130
}
131131
}
132132

133-
func (c *Component) getWatchedFiles(targetsUpdated bool) []discovery.Target {
133+
func (c *Component) getWatchedFiles() []discovery.Target {
134134
paths := make([]discovery.Target, 0)
135135
// See if there is anything new we need to check.
136136
for _, w := range c.watches {
@@ -142,4 +142,3 @@ func (c *Component) getWatchedFiles(targetsUpdated bool) []discovery.Target {
142142
}
143143
return paths
144144
}
145-

0 commit comments

Comments
 (0)