Changes on packages
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Albums
|
||||
var album = await database.Albums
|
||||
.SingleOrDefaultAsync(a => a.Id == executeContext.Arguments.AlbumId, executeContext.CancellationToken);
|
||||
|
||||
if (album is not null)
|
||||
if (album != null)
|
||||
{
|
||||
album.LifeCycleStatus = LifeCycleStatus.Failed;
|
||||
await database.SaveChangesAsync(executeContext.CancellationToken);
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Audio
|
||||
try
|
||||
{
|
||||
var track = await database.Tracks.SingleOrDefaultAsync(t => t.Id == compensateContext.Log.TrackId, compensateContext.CancellationToken);
|
||||
if (track is null)
|
||||
if (track == null)
|
||||
throw new InvalidOperationException($"Track with id {compensateContext.Log.TrackId} not found");
|
||||
|
||||
track.Audio.FolderName = compensateContext.Log.PreviousAudioFolderName;
|
||||
|
||||
+3
-3
@@ -31,14 +31,14 @@ namespace Musify.Infrastructure.MassTransit.Activities.Pictures
|
||||
[executeContext.Arguments.AlbumId],
|
||||
cancellationToken: executeContext.CancellationToken);
|
||||
|
||||
if (album is null)
|
||||
if (album == null)
|
||||
{
|
||||
logger.LogWarning("Album {AlbumId} not found",
|
||||
executeContext.Arguments.AlbumId);
|
||||
throw new InvalidOperationException($"Album with id {executeContext.Arguments.AlbumId} not found");
|
||||
}
|
||||
|
||||
if (album.Pictures is null)
|
||||
if (album.Pictures == null)
|
||||
{
|
||||
logger.LogWarning("Album {AlbumId} has no pending picture upload",
|
||||
executeContext.Arguments.AlbumId);
|
||||
@@ -85,7 +85,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Pictures
|
||||
[compensateContext.Log.AlbumId],
|
||||
cancellationToken: compensateContext.CancellationToken);
|
||||
|
||||
if (album is null)
|
||||
if (album == null)
|
||||
{
|
||||
return compensateContext.Compensated();
|
||||
}
|
||||
|
||||
+3
-3
@@ -31,14 +31,14 @@ namespace Musify.Infrastructure.MassTransit.Activities.Pictures
|
||||
[executeContext.Arguments.PlayListId],
|
||||
cancellationToken: executeContext.CancellationToken);
|
||||
|
||||
if (playList is null)
|
||||
if (playList == null)
|
||||
{
|
||||
logger.LogWarning("Playlist {PlayListId} not found",
|
||||
executeContext.Arguments.PlayListId);
|
||||
throw new InvalidOperationException($"PlayList with id {executeContext.Arguments.PlayListId} not found");
|
||||
}
|
||||
|
||||
if (playList.Pictures is null)
|
||||
if (playList.Pictures == null)
|
||||
{
|
||||
logger.LogWarning("Playlist {PlayListId} has no pending picture upload",
|
||||
executeContext.Arguments.PlayListId);
|
||||
@@ -85,7 +85,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Pictures
|
||||
[compensateContext.Log.PlayListId],
|
||||
cancellationToken: compensateContext.CancellationToken);
|
||||
|
||||
if (playList is null)
|
||||
if (playList == null)
|
||||
{
|
||||
return compensateContext.Compensated();
|
||||
}
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Pictures
|
||||
[executeContext.Arguments.TrackId],
|
||||
cancellationToken: executeContext.CancellationToken);
|
||||
|
||||
if (track is null)
|
||||
if (track == null)
|
||||
{
|
||||
logger.LogWarning("Track {TrackId} not found",
|
||||
executeContext.Arguments.TrackId);
|
||||
@@ -79,7 +79,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Pictures
|
||||
[compensateContext.Log.TrackId],
|
||||
cancellationToken: compensateContext.CancellationToken);
|
||||
|
||||
if (track is null)
|
||||
if (track == null)
|
||||
return compensateContext.Compensated();
|
||||
|
||||
track.Pictures.OriginalName = compensateContext.Log.PreviousOriginalPictureKey;
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.PlayLists
|
||||
var playList = await database.PlayLists
|
||||
.SingleOrDefaultAsync(p => p.Id == executeContext.Arguments.PlayListId, executeContext.CancellationToken);
|
||||
|
||||
if (playList is null)
|
||||
if (playList == null)
|
||||
{
|
||||
logger.LogInformation(
|
||||
"PlayList {PlayListId} not found while deleting from DB, skipping",
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.PlayLists
|
||||
var playList = await database.PlayLists
|
||||
.SingleOrDefaultAsync(p => p.Id == executeContext.Arguments.PlayListId, executeContext.CancellationToken);
|
||||
|
||||
if (playList is not null)
|
||||
if (playList != null)
|
||||
{
|
||||
playList.LifeCycleStatus = LifeCycleStatus.Failed;
|
||||
await database.SaveChangesAsync(executeContext.CancellationToken);
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.PlayLists
|
||||
var playList = await database.PlayLists
|
||||
.SingleOrDefaultAsync(p => p.Id == executeContext.Arguments.PlayListId, executeContext.CancellationToken);
|
||||
|
||||
if (playList is null)
|
||||
if (playList == null)
|
||||
{
|
||||
logger.LogInformation(
|
||||
"PlayList {PlayListId} not found while marking as removing, skipping",
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Tracks
|
||||
var track = await database.Tracks
|
||||
.SingleOrDefaultAsync(t => t.Id == executeContext.Arguments.TrackId, executeContext.CancellationToken);
|
||||
|
||||
if (track is null)
|
||||
if (track == null)
|
||||
{
|
||||
logger.LogInformation(
|
||||
"Track {TrackId} not found while deleting from DB, skipping",
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Tracks
|
||||
var track = await database.Tracks
|
||||
.SingleOrDefaultAsync(t => t.Id == executeContext.Arguments.TrackId, executeContext.CancellationToken);
|
||||
|
||||
if (track is not null)
|
||||
if (track != null)
|
||||
{
|
||||
track.LifeCycleStatus = LifeCycleStatus.Failed;
|
||||
await database.SaveChangesAsync(executeContext.CancellationToken);
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Tracks
|
||||
var track = await database.Tracks
|
||||
.SingleOrDefaultAsync(t => t.Id == executeContext.Arguments.TrackId, executeContext.CancellationToken);
|
||||
|
||||
if (track is null)
|
||||
if (track == null)
|
||||
{
|
||||
logger.LogInformation(
|
||||
"Track {TrackId} not found while marking as removing, skipping",
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ namespace Musify.Infrastructure.MassTransit.RoutingSlip.Builders
|
||||
EndpointHelper.BuildExecuteActivityUri(MarkPlayListAsRemovingActivity.ExecuteEndpointName),
|
||||
new MarkPlayListAsRemovingArguments(playListId));
|
||||
|
||||
if (playList?.Pictures is not null)
|
||||
if (playList?.Pictures != null)
|
||||
{
|
||||
var bucket = storageConfiguration.Bucket;
|
||||
var routes = playListConfiguration.Routes;
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ namespace Musify.Infrastructure.MassTransit.RoutingSlip.Builders
|
||||
EndpointHelper.BuildExecuteActivityUri(MarkTrackAsRemovingActivity.ExecuteEndpointName),
|
||||
new MarkTrackAsRemovingArguments(trackId));
|
||||
|
||||
if (track is not null)
|
||||
if (track != null)
|
||||
{
|
||||
var bucket = storageConfiguration.Bucket;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user