JobExecution
This commit is contained in:
@@ -17,6 +17,8 @@ namespace Musify.Application.Contracts.Infrastructure
|
||||
|
||||
DbSet<Job> Jobs { get; }
|
||||
|
||||
DbSet<JobExecution> JobExecutions { get; }
|
||||
|
||||
Task<int> SaveChangesAsync(CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -2,5 +2,6 @@
|
||||
{
|
||||
public record RemoveFileEvent(
|
||||
string BucketName,
|
||||
string KeyName);
|
||||
string KeyName,
|
||||
Guid JobId);
|
||||
}
|
||||
@@ -3,5 +3,6 @@
|
||||
public record ResizePictureEvent(
|
||||
string BucketName,
|
||||
string KeyName,
|
||||
ResizePictureItems[] Items);
|
||||
ResizePictureItems[] Items,
|
||||
Guid JobId);
|
||||
}
|
||||
@@ -77,7 +77,8 @@ namespace Musify.Application.PlayLists.Commands.CreatePlayList
|
||||
playListConfiguration.PicturesSizes.LargePictureWidth,
|
||||
playListConfiguration.PicturesSizes.LargePictureHeight,
|
||||
playListConfiguration.Routes.LargePictures)
|
||||
] ), cancellationToken);
|
||||
],
|
||||
Guid.NewGuid()), cancellationToken);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,8 @@ namespace Musify.Application.PlayLists.Commands.DeletePlayList
|
||||
{
|
||||
await publishEndpoint.Publish(new RemoveFileEvent(
|
||||
storageConfiguration.BucketName,
|
||||
originalImageStorageKey), cancellationToken);
|
||||
originalImageStorageKey,
|
||||
Guid.NewGuid()), cancellationToken);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -51,7 +52,8 @@ namespace Musify.Application.PlayLists.Commands.DeletePlayList
|
||||
{
|
||||
await publishEndpoint.Publish(new RemoveFileEvent(
|
||||
storageConfiguration.BucketName,
|
||||
playList.SmallPictureKeyName), cancellationToken);
|
||||
playList.SmallPictureKeyName,
|
||||
Guid.NewGuid()), cancellationToken);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -66,7 +68,8 @@ namespace Musify.Application.PlayLists.Commands.DeletePlayList
|
||||
{
|
||||
await publishEndpoint.Publish(new RemoveFileEvent(
|
||||
storageConfiguration.BucketName,
|
||||
playList.MediumPictureKeyName), cancellationToken);
|
||||
playList.MediumPictureKeyName,
|
||||
Guid.NewGuid()), cancellationToken);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -81,7 +84,8 @@ namespace Musify.Application.PlayLists.Commands.DeletePlayList
|
||||
{
|
||||
await publishEndpoint.Publish(new RemoveFileEvent(
|
||||
storageConfiguration.BucketName,
|
||||
playList.LargePictureKeyName), cancellationToken);
|
||||
playList.LargePictureKeyName,
|
||||
Guid.NewGuid()), cancellationToken);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,8 @@ namespace Musify.Application.PlayLists.Commands.UpdatePlayList
|
||||
{
|
||||
await publishEndpoint.Publish(new RemoveFileEvent(
|
||||
storageConfiguration.BucketName,
|
||||
originalImageStorageKey), cancellationToken);
|
||||
originalImageStorageKey,
|
||||
Guid.NewGuid()), cancellationToken);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -72,7 +73,8 @@ namespace Musify.Application.PlayLists.Commands.UpdatePlayList
|
||||
{
|
||||
await publishEndpoint.Publish(new RemoveFileEvent(
|
||||
storageConfiguration.BucketName,
|
||||
playList.SmallPictureKeyName), cancellationToken);
|
||||
playList.SmallPictureKeyName,
|
||||
Guid.NewGuid()), cancellationToken);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -87,7 +89,8 @@ namespace Musify.Application.PlayLists.Commands.UpdatePlayList
|
||||
{
|
||||
await publishEndpoint.Publish(new RemoveFileEvent(
|
||||
storageConfiguration.BucketName,
|
||||
playList.MediumPictureKeyName), cancellationToken);
|
||||
playList.MediumPictureKeyName,
|
||||
Guid.NewGuid()), cancellationToken);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -102,7 +105,8 @@ namespace Musify.Application.PlayLists.Commands.UpdatePlayList
|
||||
{
|
||||
await publishEndpoint.Publish(new RemoveFileEvent(
|
||||
storageConfiguration.BucketName,
|
||||
playList.LargePictureKeyName), cancellationToken);
|
||||
playList.LargePictureKeyName,
|
||||
Guid.NewGuid()), cancellationToken);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -150,7 +154,8 @@ namespace Musify.Application.PlayLists.Commands.UpdatePlayList
|
||||
playListConfiguration.PicturesSizes.LargePictureWidth,
|
||||
playListConfiguration.PicturesSizes.LargePictureHeight,
|
||||
playListConfiguration.Routes.LargePictures)
|
||||
]
|
||||
],
|
||||
Guid.NewGuid()
|
||||
), cancellationToken);
|
||||
}
|
||||
catch (Exception exception)
|
||||
|
||||
Reference in New Issue
Block a user