Fixed database update - general improvements

This commit is contained in:
2024-12-22 18:47:14 +03:30
parent 3c80744b80
commit 340192d7f0
3 changed files with 11 additions and 6 deletions

View File

@@ -48,7 +48,11 @@ public class ProcessPosts
}
// Insert post
await _db.InsertManyAsync(validPosts);
if (validPosts.Count != 0)
{
await _db.InsertManyAsync(validPosts);
}
logger?.LogInformation(
$"Proccesing done, stats: received {fetchedPosts.Count} posts, inserted and sent {newPosts} new posts.");