Skip to content

Commit

Permalink
add threading
Browse files Browse the repository at this point in the history
  • Loading branch information
JFriel committed Mar 8, 2024
1 parent c807c02 commit 8c5c93e
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Rdmp.Dicom/Extraction/FoDicomBased/FoDicomAnonymiser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using System.Collections.Generic;
using System.Linq;
using Rdmp.Core.QueryBuilding;
using System.Threading.Tasks;

namespace Rdmp.Dicom.Extraction.FoDicomBased
{
Expand Down Expand Up @@ -149,8 +150,43 @@ public DataTable ProcessPipelineData(DataTable toProcess, IDataLoadEventListener

private IColumn GetReleaseIdentifierColumn()
{
<<<<<<< Updated upstream

Check failure on line 153 in Rdmp.Dicom/Extraction/FoDicomBased/FoDicomAnonymiser.cs

View workflow job for this annotation

GitHub Actions / package

Merge conflict marker encountered
return _extractCommand.QueryBuilder.SelectColumns.Select(c => c.IColumn).Single(c => c.IsExtractionIdentifier);
}
||||||| Stash base

Check failure on line 156 in Rdmp.Dicom/Extraction/FoDicomBased/FoDicomAnonymiser.cs

View workflow job for this annotation

GitHub Actions / package

Merge conflict marker encountered
var file = (string)processRow[RelativeArchiveColumnName];
fileRows.Add(file,processRow);
dicomFiles.Add((file,file));
releaseIDs.Add(file, processRow[releaseColumn.GetRuntimeName()].ToString());
}
foreach (var dicomFile in new AmbiguousFilePath(ArchiveRootIfAny,dicomFiles).GetDataset())
{
if (_errors > 0 && _errors > ErrorThreshold)
throw new Exception($"Number of errors reported ({_errors}) reached the threshold ({ErrorThreshold})");
cancellationToken.ThrowIfAbortRequested();
ProcessFile(dicomFile.Item2,listener, releaseIDs[dicomFile.Item1],_putter,fileRows[dicomFile.Item1]);
}
=======

Check failure on line 169 in Rdmp.Dicom/Extraction/FoDicomBased/FoDicomAnonymiser.cs

View workflow job for this annotation

GitHub Actions / package

Merge conflict marker encountered
var file = (string)processRow[RelativeArchiveColumnName];
fileRows.Add(file,processRow);
dicomFiles.Add((file,file));
releaseIDs.Add(file, processRow[releaseColumn.GetRuntimeName()].ToString());
}
Parallel.ForEach(new AmbiguousFilePath(ArchiveRootIfAny, dicomFiles).GetDataset(), dicomFile =>
{
if (_errors > 0 && _errors > ErrorThreshold)
throw new Exception($"Number of errors reported ({_errors}) reached the threshold ({ErrorThreshold})");
cancellationToken.ThrowIfAbortRequested();
ProcessFile(dicomFile.Item2, listener, releaseIDs[dicomFile.Item1], _putter, fileRows[dicomFile.Item1]);
});
//foreach (var dicomFile in new AmbiguousFilePath(ArchiveRootIfAny,dicomFiles).GetDataset())
//{
// if (_errors > 0 && _errors > ErrorThreshold)
// throw new Exception($"Number of errors reported ({_errors}) reached the threshold ({ErrorThreshold})");
// cancellationToken.ThrowIfAbortRequested();
// ProcessFile(dicomFile.Item2,listener, releaseIDs[dicomFile.Item1],_putter,fileRows[dicomFile.Item1]);
//}
>>>>>>> Stashed changes

Check failure on line 189 in Rdmp.Dicom/Extraction/FoDicomBased/FoDicomAnonymiser.cs

View workflow job for this annotation

GitHub Actions / package

Merge conflict marker encountered

private DataColumn[] GetMetadataOnlyColumnsToProcess(DataTable toProcess)
{
Expand Down

0 comments on commit 8c5c93e

Please sign in to comment.