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.ShipLocker;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class ShipLockerController(IShipLockerService shipLockerService) : ControllerBase
|
||||
{
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> Get()
|
||||
{
|
||||
return Ok(await shipLockerService.Get());
|
||||
}
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ public class ShipLockerService(ILogger<ShipLockerService> logger, IOptions<Pulsa
|
|||
return new ShipLockerMaterials();
|
||||
}
|
||||
|
||||
public async Task HandleFile(string filePath)
|
||||
public async Task HandleFile(string filePath, CancellationToken token = new())
|
||||
{
|
||||
if (!FileHelper.ValidateFile(filePath))
|
||||
{
|
||||
|
|
@ -35,7 +35,7 @@ public class ShipLockerService(ILogger<ShipLockerService> logger, IOptions<Pulsa
|
|||
}
|
||||
|
||||
var file = File.Open(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
||||
var shipLocker = await JsonSerializer.DeserializeAsync<ShipLockerMaterials>(file);
|
||||
var shipLocker = await JsonSerializer.DeserializeAsync<ShipLockerMaterials>(file, cancellationToken: token);
|
||||
|
||||
if (shipLocker == null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue