Skip to content

Commit 5c70962

Browse files
authored
Merge pull request #558 from ipax77/dev
fix upload decode service
2 parents f7c916f + 50ea0c1 commit 5c70962

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

src/dsstats.api/Hubs/UploadHub.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public async Task DecodeRequest(Guid guid)
2525

2626
decodeService.DecodeFinished += decodeEventHandler;
2727

28-
var timeoutTask = Task.Delay(20000);
28+
var timeoutTask = Task.Delay(25000);
2929

3030
var completedTask = await Task.WhenAny(completionSource.Task, timeoutTask);
3131

@@ -67,7 +67,7 @@ public async Task DecodeRawRequest(Guid guid)
6767

6868
decodeService.DecodeRawFinished += decodeEventHandler;
6969

70-
var timeoutTask = Task.Delay(20000);
70+
var timeoutTask = Task.Delay(25000);
7171

7272
var completedTask = await Task.WhenAny(completionSource.Task, timeoutTask);
7373

src/dsstats.api/dsstats.api.sln

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Version 17
3+
VisualStudioVersion = 17.5.2.0
4+
MinimumVisualStudioVersion = 10.0.40219.1
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dsstats.api", "dsstats.api.csproj", "{97694AC4-1EFB-7B86-C32A-B24CC6D5BEC9}"
6+
EndProject
7+
Global
8+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
9+
Debug|Any CPU = Debug|Any CPU
10+
Release|Any CPU = Release|Any CPU
11+
EndGlobalSection
12+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
13+
{97694AC4-1EFB-7B86-C32A-B24CC6D5BEC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
14+
{97694AC4-1EFB-7B86-C32A-B24CC6D5BEC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
15+
{97694AC4-1EFB-7B86-C32A-B24CC6D5BEC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
16+
{97694AC4-1EFB-7B86-C32A-B24CC6D5BEC9}.Release|Any CPU.Build.0 = Release|Any CPU
17+
EndGlobalSection
18+
GlobalSection(SolutionProperties) = preSolution
19+
HideSolutionNode = FALSE
20+
EndGlobalSection
21+
GlobalSection(ExtensibilityGlobals) = postSolution
22+
SolutionGuid = {CDB63AA8-0210-44C7-9269-7B4C2F35E5DA}
23+
EndGlobalSection
24+
EndGlobal

src/dsstats.decode/DecodeService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private async Task<int> SaveAndQueueFiles(Guid guid, List<IFormFile> files, bool
4343
logger.LogInformation("Saved uploaded replay to temp: {path}", tempPath);
4444

4545
// Prepare job
46-
var job = new ReplayJob(Guid.NewGuid(), tempPath, "", inHouse);
46+
var job = new ReplayJob(guid, tempPath, "", inHouse);
4747

4848
// Try enqueue
4949
if (!replayQueue.TryEnqueue(job))
@@ -53,7 +53,7 @@ private async Task<int> SaveAndQueueFiles(Guid guid, List<IFormFile> files, bool
5353
}
5454
}
5555

56-
return replayQueue.QueueLength;
56+
return 1;
5757
}
5858

5959
public static ReplayMetadata GetMetaData(Sc2Replay replay)

0 commit comments

Comments
 (0)