Skip to content

Commit

Permalink
remove some more logging + add null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
hkfgo committed Oct 1, 2024
1 parent 67bf0a5 commit f04cb87
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static class AzureResourceDefinitionBatching
/// </summary>
public static List<BatchScrapeDefinition<IAzureResourceDefinition>> GroupScrapeDefinitions(IEnumerable<ScrapeDefinition<IAzureResourceDefinition>> allScrapeDefinitions, int maxBatchSize)
{
// ReSharper disable once PossibleMultipleEnumeration
Guard.NotNull(allScrapeDefinitions, nameof(allScrapeDefinitions));

return allScrapeDefinitions.GroupBy(def => def.BuildScrapingBatchInfo())

Check warning on line 24 in src/Promitor.Core.Scraping/Batching/AzureResourceDefinitionBatching.cs

View workflow job for this annotation

GitHub Actions / Code Quality (R#)

"[PossibleMultipleEnumeration] Possible multiple enumeration" on /home/runner/work/promitor/promitor/src/Promitor.Core.Scraping/Batching/AzureResourceDefinitionBatching.cs(24,1218)
Expand All @@ -32,6 +33,7 @@ public static List<BatchScrapeDefinition<IAzureResourceDefinition>> GroupScrapeD
/// </summary>
private static List<List<ScrapeDefinition<IAzureResourceDefinition>>> SplitScrapeDefinitionBatch(List<ScrapeDefinition<IAzureResourceDefinition>> batchToSplit, int maxBatchSize)
{
// ReSharper disable once PossibleMultipleEnumeration
Guard.NotNull(batchToSplit, nameof(batchToSplit));

int numNewGroups = ((batchToSplit.Count - 1) / maxBatchSize) + 1;
Expand Down

0 comments on commit f04cb87

Please sign in to comment.