Skip to content

Commit 9e523a7

Browse files
committed
gh-56 clean up unnecessary file
Signed-off-by: Victor Chang <[email protected]>
1 parent 5c2cce6 commit 9e523a7

File tree

2 files changed

+20
-59
lines changed

2 files changed

+20
-59
lines changed

src/Configuration/MessageBrokerRoutingKeysConfiguration.cs

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/InformaticsGateway/Services/Export/ExportServiceBase.cs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -203,26 +203,26 @@ private IEnumerable<ExportRequestDataMessage> DownloadPayloadActionCallback(Expo
203203
{
204204
try
205205
{
206+
_logger.Log(LogLevel.Debug, $"Downloading file {file}...");
206207
Policy
207-
.Handle<Exception>()
208-
.WaitAndRetry(
209-
_configuration.Export.Retries.RetryDelays,
210-
(exception, timeSpan, retryCount, context) =>
211-
{
212-
_logger.Log(LogLevel.Error, exception, $"Error downloading payload. Waiting {timeSpan} before next retry. Retry attempt {retryCount}.");
213-
})
214-
.Execute(() =>
215-
{
216-
var task = storageService.GetObject(_configuration.Storage.StorageServiceBucketName, file, (stream) =>
217-
{
218-
stream.Seek(0, System.IO.SeekOrigin.Begin);
219-
using var memoryStream = new MemoryStream();
220-
stream.CopyTo(memoryStream);
221-
exportRequestData.SetData(memoryStream.ToArray());
222-
}, cancellationToken);
223-
224-
task.Wait();
225-
});
208+
.Handle<Exception>()
209+
.WaitAndRetry(
210+
_configuration.Export.Retries.RetryDelays,
211+
(exception, timeSpan, retryCount, context) =>
212+
{
213+
_logger.Log(LogLevel.Error, exception, $"Error downloading payload. Waiting {timeSpan} before next retry. Retry attempt {retryCount}.");
214+
})
215+
.Execute(() =>
216+
{
217+
storageService.GetObject(_configuration.Storage.StorageServiceBucketName, file, (stream) =>
218+
{
219+
_logger.Log(LogLevel.Debug, $"Copying file {file}...");
220+
using var memoryStream = new MemoryStream();
221+
stream.CopyTo(memoryStream);
222+
exportRequestData.SetData(memoryStream.ToArray());
223+
_logger.Log(LogLevel.Debug, $"File {file} ready for export...");
224+
}, cancellationToken).Wait();
225+
});
226226
}
227227
catch (Exception ex)
228228
{
@@ -302,4 +302,4 @@ private void ReportingActionBlock(ExportRequestDataMessage exportRequestData)
302302
});
303303
}
304304
}
305-
}
305+
}

0 commit comments

Comments
 (0)