Experimental changes

This commit is contained in:
2026-03-29 17:15:39 +02:00
parent c6f919ee89
commit 697eed4e58
35 changed files with 279 additions and 445 deletions
@@ -8,7 +8,7 @@ using Musify.Infrastructure.MassTransit.Activities.Logs;
namespace Musify.Infrastructure.MassTransit.Activities
{
public class TransferFilesToBucketActivity(
IStorageHandler storageHandler,
IStorageService storageHandler,
ILogger<TransferFilesToBucketActivity> logger,
IProcessTrackingStore processTrackingStore)
: IActivity<TransferFilesToBucketArguments, TransferFilesToBucketLog>
@@ -42,23 +42,12 @@ namespace Musify.Infrastructure.MassTransit.Activities
.Select(file => Path.Combine(destinationKey, Path.GetFileName(file)))
.ToArray();
var transferFilesResult = await storageHandler.TransferFilesAsync(
await storageHandler.TransferFilesAsync(
folderPath,
executeContext.Arguments.DestinationBucket,
destinationKey,
executeContext.CancellationToken);
if (!transferFilesResult.IsSuccess)
{
var errorMessage = string.Join("; ", transferFilesResult.Errors);
logger.LogWarning("Failed to transfer files from {FolderPath} to {DestinationBucket}/{DestinationKey}: {Errors}",
folderPath,
executeContext.Arguments.DestinationBucket,
destinationKey,
errorMessage);
throw new Exception(errorMessage);
}
await processTrackingStore.CompleteStepAsync(processId, stepId, executeContext.CancellationToken);
return executeContext.Completed();
}