-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: store processor used during encoding + retry hw conversions usi…
…ng cpu on conversion fault (#46) * feat: track encode processor type + retry conversions without hw acceleration on conversion fault * feat: show processor type used in encode operation widget * chore: update nuget packages
- Loading branch information
1 parent
c8c8a5c
commit dae34ec
Showing
25 changed files
with
192 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 0 additions & 55 deletions
55
...d/src/Application.Components/Encodes/Sagas/Activities/EncodeOperationHeartbeatActivity.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 14 additions & 4 deletions
18
...ervice.Dashboard/src/Application.Components/Encodes/Sagas/EncodeStateMachineDefinition.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
using Giantnodes.Service.Dashboard.Application.Contracts.Encodes.Events; | ||
using Giantnodes.Service.Dashboard.Persistence.Sagas; | ||
using Giantnodes.Service.Encoder.Application.Contracts.Encoding.Events; | ||
using Giantnodes.Service.Encoder.Application.Contracts.Probing.Events; | ||
using MassTransit; | ||
|
||
namespace Giantnodes.Service.Dashboard.Application.Components.Encodes.Sagas; | ||
|
||
public class EncodeStateMachineDefinition : SagaDefinition<EncodeSagaState> | ||
{ | ||
private const int ConcurrencyLimit = 25; | ||
|
||
protected override void ConfigureSaga( | ||
IReceiveEndpointConfigurator endpointConfigurator, | ||
ISagaConfigurator<EncodeSagaState> sagaConfigurator, | ||
IRegistrationContext context) | ||
{ | ||
endpointConfigurator.UseMessageRetry(r => r.Interval(3, TimeSpan.FromSeconds(3))); | ||
|
||
var partition = sagaConfigurator.CreatePartitioner(1); | ||
endpointConfigurator.UsePartitioner<EncodeOperationEncodeHeartbeatEvent>(partition, p => p.Message.JobId); | ||
endpointConfigurator.UsePartitioner<EncodeOperationEncodeProgressedEvent>(partition, p => p.Message.JobId); | ||
endpointConfigurator.UsePartitioner<EncodeOperationOutputtedEvent>(partition, p => p.Message.JobId); | ||
var partition = sagaConfigurator.CreatePartitioner(ConcurrencyLimit); | ||
endpointConfigurator.UsePartitioner<EncodeCreatedEvent>(partition, p => p.Message.CorrelationId); | ||
endpointConfigurator.UsePartitioner<FileProbedEvent>(partition, p => p.Message.JobId); | ||
endpointConfigurator.UsePartitioner<EncodeOperationStartedEvent>(partition, p => p.Message.CorrelationId); | ||
endpointConfigurator.UsePartitioner<EncodeOperationEncodeBuiltEvent>(partition, p => p.Message.CorrelationId); | ||
endpointConfigurator.UsePartitioner<EncodeOperationEncodeProgressedEvent>(partition, p => p.Message.CorrelationId); | ||
endpointConfigurator.UsePartitioner<EncodeOperationOutputtedEvent>(partition, p => p.Message.CorrelationId); | ||
endpointConfigurator.UsePartitioner<EncodeOperationCompletedEvent>(partition, p => p.Message.CorrelationId); | ||
endpointConfigurator.UsePartitioner<EncodeCancelledEvent>(partition, p => p.Message.CorrelationId); | ||
endpointConfigurator.UsePartitioner<EncodeOperationFailedEvent>(partition, p => p.Message.CorrelationId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/Service.Dashboard/src/Domain.Shared/Enums/ProcessorType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Giantnodes.Service.Dashboard.Domain.Shared.Enums; | ||
|
||
public enum ProcessorType | ||
{ | ||
Cpu, | ||
Gpu | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.