Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankowitz committed Apr 5, 2023
1 parent f65a4f1 commit 73d3793
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public async Task ExecuteAsync(ExportJobRecord exportJobRecord, WeakETag weakETa
_exportJobRecord.RestartCount++;
}

// The intial list of query parameters will not have a continutation token. We will add that later if we get one back
// The initial list of query parameters will not have a continuation token. We will add that later if we get one back
// from the search result.
// As Till is a new property QueuedTime is being used as a backup incase Till doesn't exist in the job record.
var tillTime = _exportJobRecord.Till != null ? _exportJobRecord.Till : new PartialDateTime(_exportJobRecord.QueuedTime);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public async Task<string> ExecuteAsync(JobInfo jobInfo, IProgress<string> progre
return JsonConvert.SerializeObject(record);
}

private static ExportJobRecord CreateExportRecord(ExportJobRecord record, long groupId, string resourceType = null, PartialDateTime since = null, PartialDateTime till = null, string startSurrogateId = null, string endSurrogateId = null, string globalStartSurrogateId = null, string globalEndSurrogateId = null)
private static ExportJobRecord CreateExportRecord(ExportJobRecord record, long groupId)
{
var format = $"{ExportFormatTags.ResourceName}-{ExportFormatTags.Id}";
var container = record.StorageAccountContainerName;
Expand All @@ -65,17 +65,17 @@ private static ExportJobRecord CreateExportRecord(ExportJobRecord record, long g
record.RequestUri,
record.ExportType,
format,
string.IsNullOrEmpty(resourceType) ? record.ResourceType : resourceType,
record.ResourceType,
record.Filters,
record.Hash,
record.RollingFileSizeInMB,
record.RequestorClaims,
since == null ? record.Since : since,
till == null ? record.Till : till,
startSurrogateId,
endSurrogateId,
globalStartSurrogateId,
globalEndSurrogateId,
since: null,
till: null,
startSurrogateId: null,
endSurrogateId: null,
globalStartSurrogateId: null,
globalEndSurrogateId: null,
record.GroupId,
record.StorageAccountConnectionHash,
record.StorageAccountUri,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,31 +88,31 @@ public CosmosFhirOperationDataStore(

private string CollectionId { get; }

public override Task<ExportJobOutcome> GetExportJobByIdAsync(string id, CancellationToken cancellationToken)
public override async Task<ExportJobOutcome> GetExportJobByIdAsync(string id, CancellationToken cancellationToken)
{
try
{
return base.GetExportJobByIdAsync(id, cancellationToken);
return await base.GetExportJobByIdAsync(id, cancellationToken);
}
catch (JobNotFoundException)
{
// try old job records
var oldJobs = (ILegacyExportOperationDataStore)this;
return oldJobs.GetExportJobByIdAsync(id, cancellationToken);
return await oldJobs.GetExportJobByIdAsync(id, cancellationToken);
}
}

public override Task<ExportJobOutcome> UpdateExportJobAsync(ExportJobRecord jobRecord, WeakETag eTag, CancellationToken cancellationToken)
public override async Task<ExportJobOutcome> UpdateExportJobAsync(ExportJobRecord jobRecord, WeakETag eTag, CancellationToken cancellationToken)
{
try
{
return base.UpdateExportJobAsync(jobRecord, eTag, cancellationToken);
return await base.UpdateExportJobAsync(jobRecord, eTag, cancellationToken);
}
catch (JobNotFoundException)
{
// try old job records
var oldJobs = (ILegacyExportOperationDataStore)this;
return oldJobs.UpdateExportJobAsync(jobRecord, eTag, cancellationToken);
return await oldJobs.UpdateExportJobAsync(jobRecord, eTag, cancellationToken);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using Microsoft.Health.Fhir.Core.Features.Operations.Export;
using Microsoft.Health.Fhir.Core.Features.Operations.Export.Models;
using Microsoft.Health.Fhir.Core.Features.Persistence;
using Microsoft.Health.Fhir.SqlServer.Features.Operations.Export;
using Microsoft.Health.Fhir.Tests.Common;
using Microsoft.Health.JobManagement;
using Microsoft.Health.Test.Utilities;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Features\Operations\Everything\EverythingOperationContinuationTokenTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Features\Operations\Everything\EverythingOperationHandlerTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Features\Operations\Everything\PatientEverythingServiceTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Features\Operations\Export\ExportProcessingJobTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Features\Operations\Import\ImportErrorSerializerTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Features\Operations\Reindex\ReindexSingleResourceRequestHandlerTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Features\Operations\Reindex\ReindexUtilitiesTests.cs" />
Expand Down

0 comments on commit 73d3793

Please sign in to comment.