mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 20:07:22 +01:00
parallel for the queue processing, up request semaphore, remove queue position (unused), bump api version
This commit is contained in:
parent
e968adb7be
commit
5e0e21ef68
3 changed files with 14 additions and 18 deletions
|
|
@ -11,7 +11,7 @@ public class RequestController : ControllerBase
|
|||
{
|
||||
private readonly CachedFileProvider _cachedFileProvider;
|
||||
private readonly RequestQueueService _requestQueue;
|
||||
private static SemaphoreSlim _parallelRequestSemaphore = new(250);
|
||||
private static SemaphoreSlim _parallelRequestSemaphore = new(500);
|
||||
|
||||
public RequestController(ILogger<RequestController> logger, CachedFileProvider cachedFileProvider, RequestQueueService requestQueue,
|
||||
ServerTokenGenerator generator) : base(logger, generator)
|
||||
|
|
@ -73,9 +73,9 @@ public class RequestController : ControllerBase
|
|||
return Ok();
|
||||
}
|
||||
|
||||
if (_requestQueue.StillEnqueued(requestId, MareUser, out int position))
|
||||
if (_requestQueue.StillEnqueued(requestId, MareUser))
|
||||
{
|
||||
return Conflict(position);
|
||||
return Conflict();
|
||||
}
|
||||
|
||||
return BadRequest();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue