Rename variables
This commit is contained in:
+2
-2
@@ -37,7 +37,7 @@ namespace Musify.Infrastructure.MassTransit.Activities
|
||||
var workingDirectory = Path.Combine(executeContext.Arguments.TemporaryRootDirectory, destinationFolderName);
|
||||
|
||||
var sourceFilePath = Path.Combine(
|
||||
workingDirectory, Guid.NewGuid().ToString() + Path.GetExtension(executeContext.Arguments.SourceKeyName));
|
||||
workingDirectory, Guid.NewGuid().ToString() + Path.GetExtension(executeContext.Arguments.SourceKey));
|
||||
var smallPictureFilePath = Path.Combine(
|
||||
workingDirectory, Guid.NewGuid().ToString() + ResizedPictureFileExtension);
|
||||
var mediumPictureFilePath = Path.Combine(
|
||||
@@ -65,7 +65,7 @@ namespace Musify.Infrastructure.MassTransit.Activities
|
||||
catch (Exception exception)
|
||||
{
|
||||
logger.LogError(exception, "Error generating picture workflow paths for key {SourceKeyName}",
|
||||
executeContext.Arguments.SourceKeyName);
|
||||
executeContext.Arguments.SourceKey);
|
||||
await processTrackingStore.FailStepAsync(processId, stepId, exception.Message, executeContext.CancellationToken);
|
||||
throw;
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ namespace Musify.Infrastructure.MassTransit.Activities
|
||||
0,
|
||||
executeContext.CancellationToken);
|
||||
|
||||
var sourceFilePath = executeContext.GetVariable<string>(executeContext.Arguments.SourceFilePathVariableName);
|
||||
var sourceFilePath = executeContext.GetVariable<string>(executeContext.Arguments.SourceFilePathVariable);
|
||||
ArgumentNullException.ThrowIfNull(sourceFilePath, nameof(sourceFilePath));
|
||||
var destinationFilePath = executeContext.GetVariable<string>(executeContext.Arguments.DestinationFilePathVariableName);
|
||||
var destinationFilePath = executeContext.GetVariable<string>(executeContext.Arguments.DestinationFilePathVariable);
|
||||
ArgumentNullException.ThrowIfNull(destinationFilePath, nameof(destinationFilePath));
|
||||
|
||||
try
|
||||
|
||||
@@ -31,11 +31,11 @@ namespace Musify.Infrastructure.MassTransit.Activities
|
||||
0,
|
||||
executeContext.CancellationToken);
|
||||
|
||||
var smallResizedVariable = executeContext.GetVariable<string>(executeContext.Arguments.SmallPictureVariableName);
|
||||
var smallResizedVariable = executeContext.GetVariable<string>(executeContext.Arguments.SmallPictureVariable);
|
||||
ArgumentNullException.ThrowIfNull(smallResizedVariable, nameof(smallResizedVariable));
|
||||
var mediumResizedVariable = executeContext.GetVariable<string>(executeContext.Arguments.MediumPictureVariableName);
|
||||
var mediumResizedVariable = executeContext.GetVariable<string>(executeContext.Arguments.MediumPictureVariable);
|
||||
ArgumentNullException.ThrowIfNull(mediumResizedVariable, nameof(mediumResizedVariable));
|
||||
var largeResizedVariable = executeContext.GetVariable<string>(executeContext.Arguments.LargePictureVariableName);
|
||||
var largeResizedVariable = executeContext.GetVariable<string>(executeContext.Arguments.LargePictureVariable);
|
||||
ArgumentNullException.ThrowIfNull(largeResizedVariable, nameof(largeResizedVariable));
|
||||
|
||||
try
|
||||
@@ -58,7 +58,7 @@ namespace Musify.Infrastructure.MassTransit.Activities
|
||||
playList.MediumPictureKeyName,
|
||||
playList.LargePictureKeyName);
|
||||
|
||||
playList.OriginalPictureKeyName = Path.GetFileName(executeContext.Arguments.OriginalPictureKeyName);
|
||||
playList.OriginalPictureKeyName = Path.GetFileName(executeContext.Arguments.OriginalPictureKey);
|
||||
playList.SmallPictureKeyName = Path.GetFileName(smallResizedVariable);
|
||||
playList.MediumPictureKeyName = Path.GetFileName(mediumResizedVariable);
|
||||
playList.LargePictureKeyName = Path.GetFileName(largeResizedVariable);
|
||||
@@ -94,10 +94,10 @@ namespace Musify.Infrastructure.MassTransit.Activities
|
||||
return compensateContext.Compensated();
|
||||
}
|
||||
|
||||
playList.OriginalPictureKeyName = compensateContext.Log.PreviousOriginalPictureKeyName;
|
||||
playList.SmallPictureKeyName = compensateContext.Log.PreviousSmallPictureKeyName;
|
||||
playList.MediumPictureKeyName = compensateContext.Log.PreviousMediumPictureKeyName;
|
||||
playList.LargePictureKeyName = compensateContext.Log.PreviousLargePictureKeyName;
|
||||
playList.OriginalPictureKeyName = compensateContext.Log.PreviousOriginalPictureKey;
|
||||
playList.SmallPictureKeyName = compensateContext.Log.PreviousSmallPictureKey;
|
||||
playList.MediumPictureKeyName = compensateContext.Log.PreviousMediumPictureKey;
|
||||
playList.LargePictureKeyName = compensateContext.Log.PreviousLargePictureKey;
|
||||
|
||||
database.PlayLists.Update(playList);
|
||||
await database.SaveChangesAsync(compensateContext.CancellationToken);
|
||||
|
||||
@@ -31,11 +31,11 @@ namespace Musify.Infrastructure.MassTransit.Activities
|
||||
0,
|
||||
executeContext.CancellationToken);
|
||||
|
||||
var smallResizedVariable = executeContext.GetVariable<string>(executeContext.Arguments.SmallPictureVariableName);
|
||||
var smallResizedVariable = executeContext.GetVariable<string>(executeContext.Arguments.SmallPictureVariable);
|
||||
ArgumentNullException.ThrowIfNull(smallResizedVariable, nameof(smallResizedVariable));
|
||||
var mediumResizedVariable = executeContext.GetVariable<string>(executeContext.Arguments.MediumPictureVariableName);
|
||||
var mediumResizedVariable = executeContext.GetVariable<string>(executeContext.Arguments.MediumPictureVariable);
|
||||
ArgumentNullException.ThrowIfNull(mediumResizedVariable, nameof(mediumResizedVariable));
|
||||
var largeResizedVariable = executeContext.GetVariable<string>(executeContext.Arguments.LargePictureVariableName);
|
||||
var largeResizedVariable = executeContext.GetVariable<string>(executeContext.Arguments.LargePictureVariable);
|
||||
ArgumentNullException.ThrowIfNull(largeResizedVariable, nameof(largeResizedVariable));
|
||||
|
||||
try
|
||||
@@ -58,7 +58,7 @@ namespace Musify.Infrastructure.MassTransit.Activities
|
||||
track.MediumPictureKeyName,
|
||||
track.LargePictureKeyName);
|
||||
|
||||
track.OriginalPictureKeyName = Path.GetFileName(executeContext.Arguments.OriginalPictureKeyName);
|
||||
track.OriginalPictureKeyName = Path.GetFileName(executeContext.Arguments.OriginalPictureKey);
|
||||
track.SmallPictureKeyName = Path.GetFileName(smallResizedVariable);
|
||||
track.MediumPictureKeyName = Path.GetFileName(mediumResizedVariable);
|
||||
track.LargePictureKeyName = Path.GetFileName(largeResizedVariable);
|
||||
@@ -94,10 +94,10 @@ namespace Musify.Infrastructure.MassTransit.Activities
|
||||
return compensateContext.Compensated();
|
||||
}
|
||||
|
||||
track.OriginalPictureKeyName = compensateContext.Log.PreviousOriginalPictureKeyName;
|
||||
track.SmallPictureKeyName = compensateContext.Log.PreviousSmallPictureKeyName;
|
||||
track.MediumPictureKeyName = compensateContext.Log.PreviousMediumPictureKeyName;
|
||||
track.LargePictureKeyName = compensateContext.Log.PreviousLargePictureKeyName;
|
||||
track.OriginalPictureKeyName = compensateContext.Log.PreviousOriginalPictureKey;
|
||||
track.SmallPictureKeyName = compensateContext.Log.PreviousSmallPictureKey;
|
||||
track.MediumPictureKeyName = compensateContext.Log.PreviousMediumPictureKey;
|
||||
track.LargePictureKeyName = compensateContext.Log.PreviousLargePictureKey;
|
||||
|
||||
database.Tracks.Update(track);
|
||||
await database.SaveChangesAsync(compensateContext.CancellationToken);
|
||||
|
||||
Reference in New Issue
Block a user