-
Notifications
You must be signed in to change notification settings - Fork 518
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moves Cosmos Export to QueueClient (#3169)
* Moves Cosmos Export to QueueClient * Existing Cosmos Export jobs will continue to run under the old model (LegacyExportJobWorkerBackgroundService) to avoid disruption or file name changes Warning: * File names in Cosmos export will change for new jobs * Existing FHIR Servier - Cosmos installations will need to enable the `TaskHosting__Enabled` setting to ensure new export jobs run
- Loading branch information
1 parent
b6be3a1
commit e261f9c
Showing
49 changed files
with
694 additions
and
729 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/Microsoft.Health.Fhir.Core/Features/Operations/Export/ILegacyExportOperationDataStore.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// ------------------------------------------------------------------------------------------------- | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. | ||
// ------------------------------------------------------------------------------------------------- | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Microsoft.Health.Fhir.Core.Features.Operations.Export.Models; | ||
using Microsoft.Health.Fhir.Core.Features.Persistence; | ||
|
||
namespace Microsoft.Health.Fhir.Core.Features.Operations.Export; | ||
|
||
/// <summary> | ||
/// Provides access to the legacy export job data. | ||
/// </summary> | ||
public interface ILegacyExportOperationDataStore | ||
{ | ||
/// <summary> | ||
/// Gets an export job by id. | ||
/// </summary> | ||
/// <param name="id">The id of the job.</param> | ||
/// <param name="cancellationToken">The cancellation token.</param> | ||
/// <returns>An instance of the existing export job.</returns> | ||
/// <exception cref="JobNotFoundException"> thrown when the specific <paramref name="id"/> is not found. </exception> | ||
Task<ExportJobOutcome> GetLegacyExportJobByIdAsync(string id, CancellationToken cancellationToken); | ||
|
||
/// <summary> | ||
/// Updates an existing export job. | ||
/// </summary> | ||
/// <param name="jobRecord">The job record.</param> | ||
/// <param name="eTag">The eTag used for optimistic concurrency.</param> | ||
/// <param name="cancellationToken">The cancellation token.</param> | ||
/// <returns>An instance of the updated export job.</returns> | ||
Task<ExportJobOutcome> UpdateLegacyExportJobAsync(ExportJobRecord jobRecord, WeakETag eTag, CancellationToken cancellationToken); | ||
|
||
/// <summary> | ||
/// Acquires export jobs. | ||
/// </summary> | ||
/// <param name="numberOfJobsToAcquire">The number of jobs to acquire.</param> | ||
/// <param name="jobHeartbeatTimeoutThreshold">The job heartbeat timeout threshold.</param> | ||
/// <param name="cancellationToken">The cancellation token.</param> | ||
/// <returns>A list of acquired export job.</returns> | ||
Task<IReadOnlyCollection<ExportJobOutcome>> AcquireLegacyExportJobsAsync(ushort numberOfJobsToAcquire, TimeSpan jobHeartbeatTimeoutThreshold, CancellationToken cancellationToken); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.