mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 22:54:14 +01:00
enqueue user if they somehow lost the queue but got no positive reply from the server
This commit is contained in:
parent
9b4e298b66
commit
e97f4cb6d6
2 changed files with 5 additions and 5 deletions
2
MareAPI
2
MareAPI
|
|
@ -1 +1 @@
|
||||||
Subproject commit 18b93b889507733cbc775a263f49f7af989bc9cb
|
Subproject commit 9fea4c30da56d842a10a209a9945fd7f3cb98f4b
|
||||||
|
|
@ -78,14 +78,14 @@ public class RequestController : ControllerBase
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route(MareFiles.Request_Check)]
|
[Route(MareFiles.Request_Check)]
|
||||||
public async Task<IActionResult> CheckQueueAsync(Guid requestId)
|
public async Task<IActionResult> CheckQueueAsync(Guid requestId, string file)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await _parallelRequestSemaphore.WaitAsync(HttpContext.RequestAborted);
|
await _parallelRequestSemaphore.WaitAsync(HttpContext.RequestAborted);
|
||||||
if (_requestQueue.StillEnqueued(requestId, MareUser))
|
if (!_requestQueue.StillEnqueued(requestId, MareUser))
|
||||||
|
await _requestQueue.EnqueueUser(new(requestId, MareUser, file));
|
||||||
return Ok();
|
return Ok();
|
||||||
return BadRequest();
|
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException) { return BadRequest(); }
|
catch (OperationCanceledException) { return BadRequest(); }
|
||||||
finally
|
finally
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue