mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 22:17:22 +01:00
Single file transfer (#26)
* move to single file transfer for server * fix cache get --------- Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
This commit is contained in:
parent
715bd87907
commit
fd0327b2c4
7 changed files with 30 additions and 35 deletions
|
|
@ -21,7 +21,7 @@ public class RequestFileStreamResult : FileStreamResult
|
|||
_mareMetrics.IncGauge(MetricsAPI.GaugeCurrentDownloads);
|
||||
|
||||
// forcefully release slot after secondsUntilRelease
|
||||
Task.Run(async () =>
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ public class RequestFileStreamResultFactory
|
|||
_configurationService = configurationService;
|
||||
}
|
||||
|
||||
public RequestFileStreamResult Create(Guid requestId, FileStream fs)
|
||||
public RequestFileStreamResult Create(Guid requestId, MemoryStream ms)
|
||||
{
|
||||
return new RequestFileStreamResult(requestId, _configurationService.GetValueOrDefault(nameof(StaticFilesServerConfiguration.DownloadQueueReleaseSeconds), 15),
|
||||
_requestQueueService, _metrics, fs, "application/octet-stream");
|
||||
_requestQueueService, _metrics, ms, "application/octet-stream");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
namespace MareSynchronosStaticFilesServer.Utils;
|
||||
|
||||
public record UserRequest(Guid RequestId, string User, string FileId);
|
||||
public record UserRequest(Guid RequestId, string User, List<string> FileIds);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue