File tree Expand file tree Collapse file tree 1 file changed +18
-18
lines changed Expand file tree Collapse file tree 1 file changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -228,25 +228,25 @@ func (p *LogAnalyticsProber) executeQueries() {
228228 wgProbes := p .NewSizedWaitGroup ()
229229
230230 // query workspaces
231- for _ , row := range p .workspaceList {
232- workspaceId := row
233- // Run the query and get the results
234- prometheusQueryRequests .With (prometheus.Labels {"workspaceID" : workspaceId , "module" : p .config .moduleName , "metric" : queryConfig .Metric }).Inc ()
235-
236- wgProbes .Add ()
237- go func () {
238- defer wgProbes .Done ()
239- p .sendQueryToWorkspace (
240- contextLogger ,
241- workspaceId ,
242- queryClient ,
243- queryConfig ,
244- resultChannel ,
245- )
246- }()
247- }
248-
249231 go func () {
232+ for _ , row := range p .workspaceList {
233+ workspaceId := row
234+ // Run the query and get the results
235+ prometheusQueryRequests .With (prometheus.Labels {"workspaceID" : workspaceId , "module" : p .config .moduleName , "metric" : queryConfig .Metric }).Inc ()
236+
237+ wgProbes .Add ()
238+ go func () {
239+ defer wgProbes .Done ()
240+ p .sendQueryToWorkspace (
241+ contextLogger ,
242+ workspaceId ,
243+ queryClient ,
244+ queryConfig ,
245+ resultChannel ,
246+ )
247+ }()
248+ }
249+
250250 // wait until queries are done for closing channel and waiting for result process
251251 wgProbes .Wait ()
252252 close (resultChannel )
You can’t perform that action at this time.
0 commit comments