Adds the PlayList picture-processing lifecycle saga (correlated by PlayListId)
mirroring the track one, and generalizes the failure plumbing:
- Rename the track fault translator to ProcessingSlipFaultConsumer and use a
generic Workflow.SubjectId variable + ProcessKind; it now emits typed
Track{Picture,Audio}/PlayListPicture ProcessingFailed events for all slips
- PlayListProcessingStateMachine (+ EF-persisted PlayListProcessingState,
migration): starts on CreatePlayListResourcesEvent, finalizes on
PlayListPictureProcessed, and on failure marks the playlist Failed and
removes the orphaned final picture (PlayListProcessingFailedConsumer +
MarkPlayListAsFailedActivity)
- UpdatePlayListPictureActivity publishes PlayListPictureProcessed on success
- Picture slip carries SubjectId + PlayListPicture kind + fault subscription
Verified end-to-end in Docker (RabbitMQ + migrated Postgres): both saga
endpoints, the fault translator and cleanup consumers configure, and an
addressing cross-check confirms all 21 activity execute queues the builders
address exist (caught + fixed a kebab mismatch on mark-play-list-as-failed).
Build: 0 warnings, 0 errors.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
35 lines
1.3 KiB
C#
35 lines
1.3 KiB
C#
namespace Musify.Infrastructure.MassTransit
|
|
{
|
|
internal static class RoutingSlipVariableNames
|
|
{
|
|
internal static class Workflow
|
|
{
|
|
internal const string TemporalDirectory = "Workflow.TemporalDirectory";
|
|
internal const string CorrelationId = "Workflow.CorrelationId";
|
|
internal const string SubjectId = "Workflow.SubjectId";
|
|
internal const string ProcessKind = "Workflow.ProcessKind";
|
|
}
|
|
|
|
internal static class ProcessKinds
|
|
{
|
|
internal const string TrackPicture = "TrackPicture";
|
|
internal const string TrackAudio = "TrackAudio";
|
|
internal const string PlayListPicture = "PlayListPicture";
|
|
}
|
|
|
|
internal static class Audio
|
|
{
|
|
internal const string SourceFilePath = "Audio.SourceFilePath";
|
|
internal const string TranscodedDirectory = "Audio.TranscodedDirectory";
|
|
}
|
|
|
|
internal static class Picture
|
|
{
|
|
internal const string OriginalFilePath = "Picture.OriginalFilePath";
|
|
internal const string SmallResizedFilePath = "Picture.SmallResizedFilePath";
|
|
internal const string MediumResizedFilePath = "Picture.MediumResizedFilePath";
|
|
internal const string LargeResizedFilePath = "Picture.LargeResizedFilePath";
|
|
}
|
|
}
|
|
}
|