Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
vplauzon committed Jan 23, 2025
1 parent a0bf0bb commit cc4a853
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
10 changes: 5 additions & 5 deletions code/KustoCopyConsole/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,18 @@ private static async Task RunOptionsAsync(CommandLineOptions options)
cancellationTokenSource.Cancel();
taskCompletionSource.Task.Wait();
};
Trace.WriteLine("");
Trace.WriteLine("Parameterization:");
Trace.WriteLine("");
Trace.WriteLine(parameterization.ToYaml());
Trace.WriteLine("");
try
{
await using (var mainRunner = await MainRunner.CreateAsync(
parameterization,
options.LogFilePath,
cancellationTokenSource.Token))
{
Trace.WriteLine("");
Trace.WriteLine("Parameterization:");
Trace.WriteLine("");
Trace.WriteLine(parameterization.ToYaml());
Trace.WriteLine("");
Trace.WriteLine("Processing...");
Trace.WriteLine("");
await mainRunner.RunAsync(cancellationTokenSource.Token);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ namespace KustoCopyConsole.Storage.AzureStorage
{
internal class AzureBlobAppendStorage : IAppendStorage
{
private static readonly AsyncPolicy _writeBlockRetryPolicy = Policy.Handle<RequestFailedException>(
ex => ex.ErrorCode == "ConditionNotMet")
private static readonly AsyncPolicy _writeBlockRetryPolicy =
Policy.Handle<RequestFailedException>()
.RetryAsync(3);

private readonly DataLakeFileClient _fileClient;
private readonly AppendBlobClient _blobClient;
private readonly BlobLock _blobLock;
private int _writeCount = 0;


#region Constructors
private AzureBlobAppendStorage(
DataLakeFileClient fileClient,
Expand Down
2 changes: 1 addition & 1 deletion code/KustoCopyConsole/Storage/AzureStorage/BlobLock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal class BlobLock : IAsyncDisposable
private BlobLock(BlobLeaseClient leaseClient, CancellationToken ct)
{
LeaseClient = leaseClient;
_backgroundTask = BackGroundRenewLockAsync(ct);
_backgroundTask = Task.Run(() => BackGroundRenewLockAsync(ct));
}

internal static async Task<BlobLock> CreateAsync(
Expand Down
2 changes: 1 addition & 1 deletion code/KustoCopyConsole/Storage/RowItemGateway.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private RowItemGateway(
CancellationToken ct)
{
_appendStorage = appendStorage;
_backgroundTask = BackgroundPersistanceAsync(ct);
_backgroundTask = Task.Run(() => BackgroundPersistanceAsync(ct));
InMemoryCache = cache;
}

Expand Down

0 comments on commit cc4a853

Please sign in to comment.