Renames and changes

This commit is contained in:
2026-03-28 15:32:36 +01:00
parent 3132b139f7
commit 7709fe737f
28 changed files with 236 additions and 241 deletions
@@ -41,7 +41,7 @@ namespace Musify.Infrastructure.MassTransit.Activities
{
if (!File.Exists(sourceFilePath))
{
logger.LogWarning("Source file not found at {SourceFilePath}", sourceFilePath);
logger.LogWarning("Source file not found at={SourceFilePath}", sourceFilePath);
throw new FileNotFoundException($"Source file not found: {sourceFilePath}");
}
@@ -56,7 +56,7 @@ namespace Musify.Infrastructure.MassTransit.Activities
if (!resizedPicture.IsSuccess)
{
var errorMessage = string.Join("; ", resizedPicture.Errors);
logger.LogError("Failed to resize picture {SourceFilePath} to {Width}x{Height}. Errors: {Errors}",
logger.LogError("Failed to resize picture={SourceFilePath} to={Width}x{Height}. Errors={Errors}",
sourceFilePath,
executeContext.Arguments.Width,
executeContext.Arguments.Height,
@@ -71,18 +71,16 @@ namespace Musify.Infrastructure.MassTransit.Activities
await using var destinationStream = File.Create(destinationFilePath);
await resizedPicture.Value.CopyToAsync(destinationStream, executeContext.CancellationToken);
logger.LogDebug("Picture resized from {SourceFilePath} to {DestinationFilePath} ({Width}x{Height})",
logger.LogDebug("Picture resized from={SourceFilePath} to={DestinationFilePath}",
sourceFilePath,
destinationFilePath,
executeContext.Arguments.Width,
executeContext.Arguments.Height);
destinationFilePath);
await processTrackingStore.CompleteStepAsync(processId, stepId, executeContext.CancellationToken);
return executeContext.Completed(new ResizePictureLog(destinationFilePath));
}
catch (Exception exception)
{
logger.LogError(exception, "Error resizing picture {SourceFilePath}", sourceFilePath);
logger.LogError(exception, "Error resizing picture={SourceFilePath}", sourceFilePath);
await processTrackingStore.FailStepAsync(processId, stepId, exception.Message, executeContext.CancellationToken);
throw;
}
@@ -97,7 +95,7 @@ namespace Musify.Infrastructure.MassTransit.Activities
}
catch (Exception exception)
{
logger.LogError(exception, "Error compensating resized file {DestinationFilePath}", compensateContext.Log.DestinationFilePath);
logger.LogError(exception, "Error compensating resized file={DestinationFilePath}", compensateContext.Log.DestinationFilePath);
return Task.FromResult(compensateContext.Failed(exception));
}
}