Formatting
This commit is contained in:
+6
-6
@@ -27,7 +27,7 @@ namespace Musify.Infrastructure.MassTransit
|
||||
|
||||
outbox.QueryDelay = TimeSpan.FromSeconds(1);
|
||||
outbox.DuplicateDetectionWindow = TimeSpan.FromMinutes(30);
|
||||
});
|
||||
} );
|
||||
|
||||
options.UsingRabbitMq((busRegistrationContext, busFactoryConfigurator) =>
|
||||
ConfigureRabbitMqHost(
|
||||
@@ -61,7 +61,7 @@ namespace Musify.Infrastructure.MassTransit
|
||||
|
||||
outbox.QueryDelay = TimeSpan.FromSeconds(1);
|
||||
outbox.DuplicateDetectionWindow = TimeSpan.FromMinutes(30);
|
||||
});
|
||||
} );
|
||||
|
||||
options.SetKebabCaseEndpointNameFormatter();
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace Musify.Infrastructure.MassTransit
|
||||
repository.ConcurrencyMode = ConcurrencyMode.Pessimistic;
|
||||
repository.ExistingDbContext<Database>();
|
||||
repository.UsePostgres();
|
||||
});
|
||||
} );
|
||||
|
||||
options.AddSagaStateMachine<PlayListProcessingStateMachine, PlayListProcessingState>()
|
||||
.EntityFrameworkRepository(repository =>
|
||||
@@ -81,13 +81,13 @@ namespace Musify.Infrastructure.MassTransit
|
||||
repository.ConcurrencyMode = ConcurrencyMode.Pessimistic;
|
||||
repository.ExistingDbContext<Database>();
|
||||
repository.UsePostgres();
|
||||
});
|
||||
} );
|
||||
|
||||
options.AddConfigureEndpointsCallback((registrationContext, _, endpointConfigurator) =>
|
||||
{
|
||||
UseStandardRetry(endpointConfigurator);
|
||||
endpointConfigurator.UseEntityFrameworkOutbox<Database>(registrationContext);
|
||||
});
|
||||
} );
|
||||
|
||||
options.UsingRabbitMq((busRegistrationContext, busFactoryConfigurator) =>
|
||||
{
|
||||
@@ -96,7 +96,7 @@ namespace Musify.Infrastructure.MassTransit
|
||||
busRegistrationContext.GetRequiredService<MassTransitConfiguration>());
|
||||
|
||||
busFactoryConfigurator.ConfigureEndpoints(busRegistrationContext);
|
||||
});
|
||||
} );
|
||||
} );
|
||||
|
||||
return serviceDescriptors;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Musify.Infrastructure.MassTransit.Sagas
|
||||
context.Saga.UpdatedAt = DateTime.UtcNow;
|
||||
context.Saga.Bucket = context.Message.Bucket;
|
||||
context.Saga.PictureKey = context.Message.PictureDestinationKey;
|
||||
})
|
||||
} )
|
||||
.TransitionTo(Processing));
|
||||
|
||||
During(Processing,
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Musify.Infrastructure.MassTransit.Sagas
|
||||
context.Saga.Bucket = context.Message.Bucket;
|
||||
context.Saga.PictureKey = context.Message.PictureDestinationKey;
|
||||
context.Saga.AudioKey = context.Message.AudioDestinationKey;
|
||||
})
|
||||
} )
|
||||
.TransitionTo(Processing));
|
||||
|
||||
During(Processing,
|
||||
@@ -42,14 +42,14 @@ namespace Musify.Infrastructure.MassTransit.Sagas
|
||||
{
|
||||
context.Saga.PictureProcessed = true;
|
||||
context.Saga.UpdatedAt = DateTime.UtcNow;
|
||||
})
|
||||
} )
|
||||
.If(context => context.Saga.AudioProcessed, binder => binder.Finalize()),
|
||||
When(AudioProcessed)
|
||||
.Then(context =>
|
||||
{
|
||||
context.Saga.AudioProcessed = true;
|
||||
context.Saga.UpdatedAt = DateTime.UtcNow;
|
||||
})
|
||||
} )
|
||||
.If(context => context.Saga.PictureProcessed, binder => binder.Finalize()),
|
||||
When(PictureFailed)
|
||||
.Then(context => context.Saga.UpdatedAt = DateTime.UtcNow)
|
||||
|
||||
Reference in New Issue
Block a user