Moar logging (#21)

This commit is contained in:
Gervasio Marchand 2022-12-22 04:44:34 -08:00 committed by GitHub
parent 83ca6bb63b
commit 2c11b898ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,13 +105,18 @@ await Parallel.ForEachAsync(sitesTags, new ParallelOptions{MaxDegreeOfParallelis
return; return;
} }
int count = 0;
foreach (var statusLink in data.OrderedItems.Where(i=>!imported.Contains(i))) foreach (var statusLink in data.OrderedItems.Where(i=>!imported.Contains(i)))
{ {
statusesToLoadBag.Add(statusLink); statusesToLoadBag.Add(statusLink);
count++;
} }
Console.WriteLine($"Retrieved {count} new statuses from {site} with hashtag #{tag}");
}); });
var statusesToLoad = statusesToLoadBag.ToHashSet(); var statusesToLoad = statusesToLoadBag.ToHashSet();
Console.WriteLine($"Originally retrieved {statusesToLoadBag.Count} statuses. After removing duplicates, I got {statusesToLoad.Count} really unique ones");
foreach (var statusLink in statusesToLoad) foreach (var statusLink in statusesToLoad)
{ {
Console.WriteLine($"Bringing in {statusLink}"); Console.WriteLine($"Bringing in {statusLink}");