Merge pull request #106 from iPromKnight/hotfix-producer-dont-break

hotfix continue, not break - add slight delay - log params
This commit is contained in:
iPromKnight
2024-03-03 04:11:34 +00:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -44,7 +44,8 @@ public partial class TorrentioCrawler(
if (items.Count == 0)
{
logger.LogInformation("No items to process for {TorrentioInstance}", instance.Name);
break;
await Task.Delay(10000);
continue;
}
var newTorrents = new List<Torrent>();

View File

@@ -17,6 +17,11 @@ public class ImdbMongoDbService
public async Task<IReadOnlyList<ImdbEntry>> GetImdbEntriesForRequests(string startYear, int requestLimit, string? startingId = null)
{
_logger.LogInformation("Getting IMDB entries for requests");
_logger.LogInformation("Start year: {StartYear}", startYear);
_logger.LogInformation("Request limit: {RequestLimit}", requestLimit);
_logger.LogInformation("Starting ID: {StartingId}", startingId);
var sort = Builders<ImdbEntry>.Sort
.Descending(e => e.StartYear)
.Descending(e => e.ImdbId);