Journals Now processed in own thread
Some invalid journal data is now handled Journals now use polymorphic deserialization Added Event names to all journal events Remove unused controllers
This commit is contained in:
parent
ae848e036d
commit
efd0b3e0c0
297 changed files with 826 additions and 208 deletions
|
|
@ -1,12 +0,0 @@
|
|||
namespace Pulsar.Features.ModulesInfo;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class ModulesInfoController(IModulesInfoService modulesInfo) : ControllerBase
|
||||
{
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> Get()
|
||||
{
|
||||
return Ok(await modulesInfo.Get());
|
||||
}
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@ public class ModulesInfoService(
|
|||
{
|
||||
public string FileName => FileHandlerService.ModulesInfoFileName;
|
||||
|
||||
public async Task HandleFile(string filePath)
|
||||
public async Task HandleFile(string filePath, CancellationToken token = new())
|
||||
{
|
||||
if (!FileHelper.ValidateFile(filePath))
|
||||
{
|
||||
|
|
@ -19,7 +19,7 @@ public class ModulesInfoService(
|
|||
}
|
||||
|
||||
var file = File.Open(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
||||
var moduleInfo = await JsonSerializer.DeserializeAsync<ModuleInfoFile>(file);
|
||||
var moduleInfo = await JsonSerializer.DeserializeAsync<ModuleInfoFile>(file, cancellationToken: token);
|
||||
|
||||
if (moduleInfo == null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue