Skip to content

Commit

Permalink
fix: More logging
Browse files Browse the repository at this point in the history
  • Loading branch information
itssimple committed Jan 9, 2024
1 parent a46027e commit e742a84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CFLookup/Jobs/GetLatestUpdatedModPerGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static async Task RunAsync(PerformContext context)

foreach (var game in allGames)
{
Console.WriteLine($"Starting to check for latest updated mod for {game.Name}");
Console.WriteLine($"Starting to check for latest updated mod for {game.Name} (GameId: {game.Id})");
await _db.StringSetAsync($"cf-game-{game.Id}", JsonSerializer.Serialize(game), TimeSpan.FromDays(1));

var latestUpdatedMod = await cfClient.SearchModsAsync(game.Id, sortField: ModsSearchSortField.LastUpdated, sortOrder: ModsSearchSortOrder.Descending, pageSize: 1);
Expand All @@ -110,7 +110,7 @@ public static async Task RunAsync(PerformContext context)
var latestUpdatedFile = mod.LatestFiles.OrderByDescending(f => f.FileDate).FirstOrDefault();
if (latestUpdatedFile != null)
{
Console.WriteLine($"Latest updated mod for {game.Name} is {mod.Name} with {mod.DownloadCount} downloads and the latest file was updated {latestUpdatedFile.FileDate}");
Console.WriteLine($"Latest updated mod for {game.Name} (GameId: {game.Id}) is {mod.Name} (ModId: {mod.Id}) with {mod.DownloadCount} downloads and the latest file was updated {latestUpdatedFile.FileDate}");
if (lastUpdatedMod < latestUpdatedFile.FileDate)
{
lastUpdatedMod = latestUpdatedFile.FileDate;
Expand Down

0 comments on commit e742a84

Please sign in to comment.