mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Add messages about broken lists
This commit is contained in:
parent
24b3b4fb02
commit
a03cda8a31
@ -42,9 +42,13 @@ namespace Wabbajack.Server.Services
|
|||||||
var data = await _sql.GetValidationData();
|
var data = await _sql.GetValidationData();
|
||||||
|
|
||||||
using var queue = new WorkQueue();
|
using var queue = new WorkQueue();
|
||||||
|
var oldSummaries = Summaries;
|
||||||
|
|
||||||
var results = await data.ModLists.PMap(queue, async list =>
|
var results = await data.ModLists.PMap(queue, async list =>
|
||||||
{
|
{
|
||||||
|
var oldSummary =
|
||||||
|
oldSummaries.FirstOrDefault(s => s.Summary.MachineURL == list.Metadata.Links.MachineURL);
|
||||||
|
|
||||||
var (metadata, modList) = list;
|
var (metadata, modList) = list;
|
||||||
var archives = await modList.Archives.PMap(queue, async archive =>
|
var archives = await modList.Archives.PMap(queue, async archive =>
|
||||||
{
|
{
|
||||||
@ -80,6 +84,45 @@ namespace Wabbajack.Server.Services
|
|||||||
}).ToList()
|
}).ToList()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (oldSummary != default && oldSummary.Summary.Failed != summary.Failed)
|
||||||
|
{
|
||||||
|
_logger.Log(LogLevel.Information, $"Number of failures {oldSummary.Summary.Failed} -> {summary.Failed}");
|
||||||
|
|
||||||
|
if (summary.HasFailures)
|
||||||
|
{
|
||||||
|
await _discord.Send(Channel.Ham,
|
||||||
|
new DiscordMessage
|
||||||
|
{
|
||||||
|
Embeds = new[]
|
||||||
|
{
|
||||||
|
new DiscordEmbed
|
||||||
|
{
|
||||||
|
Description =
|
||||||
|
$"Number of failures in {summary.Name} (`{summary.MachineURL}`) was {oldSummary.Summary.Failed} is now {summary.Failed}",
|
||||||
|
Url = new Uri(
|
||||||
|
$"https://build.wabbajack.org/lists/status/{summary.MachineURL}.html")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!summary.HasFailures)
|
||||||
|
{
|
||||||
|
await _discord.Send(Channel.Ham,
|
||||||
|
new DiscordMessage
|
||||||
|
{
|
||||||
|
Embeds = new[]
|
||||||
|
{
|
||||||
|
new DiscordEmbed
|
||||||
|
{
|
||||||
|
Description = $"{summary.Name} (`{summary.MachineURL}`) is now passing.",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return (summary, detailed);
|
return (summary, detailed);
|
||||||
});
|
});
|
||||||
Summaries = results;
|
Summaries = results;
|
||||||
|
Loading…
Reference in New Issue
Block a user