Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"program": "${workspaceFolder}/service-host/bin/Debug/net8.0/service-host.dll",
"args": [
"--service",
"SignatureIngestor",
"MetadataMapDump",
"--reportingserver",
"https://localhost:7023"
],
Expand Down
3 changes: 2 additions & 1 deletion hasheous-lib/Classes/DataObjects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2523,7 +2523,8 @@ void AddArticleVariants(string value)
}
}

Logging.Log(Logging.LogType.Information, "Import Game", "Search candidates: " + String.Join(", ", distinctCandidates));
// remove blank entries and any entries that are just punctuation or dashes
distinctCandidates = distinctCandidates.Where(c => !string.IsNullOrWhiteSpace(c) && c.Any(char.IsLetterOrDigit)).ToList();

return distinctCandidates;
}
Expand Down
19 changes: 13 additions & 6 deletions hasheous-lib/Classes/Logging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,22 @@ static public void Log(LogType EventType, string ServerProcess, string Message,
/// <param name="performETACalculation">If true, performs ETA calculation for the progress item.</param>
static public void SendReport(string progressItemKey, int? count, int? total, string description, bool performETACalculation = false)
{
if (report != null)
try
{
_ = report.SendAsync(progressItemKey, count, total, description, performETACalculation).ContinueWith(task =>
if (report != null)
{
if (task.IsFaulted)
_ = report.SendAsync(progressItemKey, count, total, description, performETACalculation).ContinueWith(task =>
{
Console.WriteLine($"[Logging.SendReport] Error sending report: {task.Exception?.InnerException?.Message}");
}
}, TaskScheduler.Default);
if (task.IsFaulted)
{
// swallow any exceptions from sending the report to avoid impacting the main process
}
}, TaskScheduler.Default);
}
}
catch
{
// swallow any exceptions from sending the report to avoid impacting the main process
}
}

Expand Down
250 changes: 140 additions & 110 deletions hasheous-lib/Classes/ProcessQueue/Tasks/Dumps.cs

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions hasheous-lib/Classes/Report.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,12 @@ public async System.Threading.Tasks.Task SendAsync(string progressItemKey, int?
try
{
string url = $"{this.reportingServerUrl}/api/v1.0/BackgroundTasks/{this.processId}/{this.correlationId}/report";
Console.WriteLine($"Sending report to {url}");
var response = await httpClient.PostAsync(url, content);
response.EnsureSuccessStatusCode();
}
catch (Exception ex)
catch
{
// Log the error but do not throw
Console.WriteLine($"Failed to send report to server: {ex.Message}");
// swallow the error to prevent reporting issues to the console
}
}
finally
Expand Down
14 changes: 7 additions & 7 deletions hasheous-lib/hasheous-lib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
<PackageReference Include="gaseous.IGDB" Version="1.0.5" />
<PackageReference Include="hasheous-client" Version="1.4.6" />
<PackageReference Include="HtmlAgilityPack" Version="1.12.4" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.24" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="8.0.24" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.24" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="8.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.1.0" />
<PackageReference Include="StackExchange.Redis" Version="2.11.8" />
<PackageReference Include="StackExchange.Redis" Version="2.12.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="[9.0.6]" />
<PackageReference Include="MySqlConnector" Version="2.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.24" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.24" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.25" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.25" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.5" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="9.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion hasheous/Controllers/V1.0/TaskWorkerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace hasheous_server.Controllers.v1_0
[ApiController]
[Route("api/v{version:apiVersion}/[controller]/")]
[ApiVersion("1.0")]
[ApiExplorerSettings(IgnoreApi = false)]
[ApiExplorerSettings(IgnoreApi = true)]
[IgnoreAntiforgeryToken]
public class TaskWorkerController : ControllerBase
{
Expand Down
Loading