Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Aragas committed Oct 3, 2023
1 parent ae228f7 commit 0a0e5dd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.3.1" />
<PackageReference Include="Blazorise.Snackbar" Version="1.3.1" />
<PackageReference Include="Blazorise.TreeView" Version="1.3.1" />
<PackageReference Include="BUTR.CrashReport" Version="13.0.0.14" />
<PackageReference Include="butr.crashreport.bannerlord.parser" Version="13.0.0.14" />
<PackageReference Include="BUTR.CrashReport" Version="13.0.0.15" />
<PackageReference Include="BUTR.CrashReport.Bannerlord.Parser" Version="13.0.0.15" />
<PackageReference Include="CsvHelper" Version="30.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.11" PrivateAssets="all" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<ItemGroup>
<PackageReference Include="Aragas.Extensions.Options.FluentValidation" Version="1.1.0.14" />
<PackageReference Include="BUTR.Authentication.NexusMods" Version="1.0.0.6" />
<PackageReference Include="BUTR.CrashReport" Version="13.0.0.14" />
<PackageReference Include="butr.crashreport.bannerlord.parser" Version="13.0.0.14" />
<PackageReference Include="BUTR.CrashReport" Version="13.0.0.15" />
<PackageReference Include="BUTR.CrashReport.Bannerlord.Parser" Version="13.0.0.15" />
<PackageReference Include="Community.Microsoft.Extensions.Caching.PostgreSql" Version="4.0.4" />
<PackageReference Include="DynamicExpressions.NET" Version="1.1.0" />
<PackageReference Include="ICSharpCode.Decompiler" Version="8.1.1.7464" />
Expand Down
10 changes: 7 additions & 3 deletions src/BUTR.Site.NexusMods.Server/Jobs/CrashReportProcessorJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
using BUTR.Site.NexusMods.Server.Options;
using BUTR.Site.NexusMods.Server.Services;

using HtmlAgilityPack;

using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -65,7 +63,7 @@ await Parallel.ForEachAsync(requests, options, async (entry, ct2) =>
{
var (fileId, version, date) = entry;

CrashReportModel model;
CrashReportModel? model;
if (version <= 12)
{
var content = await client.GetCrashReportAsync(fileId, ct2);
Expand All @@ -85,6 +83,12 @@ await Parallel.ForEachAsync(requests, options, async (entry, ct2) =>
model = await client.GetCrashReportModelAsync(fileId, ct2);
}

if (model is null)
{
logger.LogError("Failed to parse {FileId}", fileId);
return;
}


await httpResultChannel.WaitToWriteAsync(ct2);
await httpResultChannel.WriteAsync(new(fileId, date, model), ct2);
Expand Down

0 comments on commit 0a0e5dd

Please sign in to comment.