diff --git a/service/Abstractions/Pipeline/IPipelineOrchestrator.cs b/service/Abstractions/Pipeline/IPipelineOrchestrator.cs index 0ab686011..342d014a5 100644 --- a/service/Abstractions/Pipeline/IPipelineOrchestrator.cs +++ b/service/Abstractions/Pipeline/IPipelineOrchestrator.cs @@ -61,22 +61,22 @@ public interface IPipelineOrchestrator Task RunPipelineAsync(DataPipeline pipeline, CancellationToken cancellationToken = default); /// - /// Fetch the pipeline status from storage + /// Get pipeline from storage /// /// Index where memory is stored /// Id of the document and pipeline execution instance /// Async task cancellation token - /// Pipeline status if available - Task ReadPipelineStatusAsync(string index, string documentId, CancellationToken cancellationToken = default); + /// Pipeline if available + Task GetPipelineAsync(string index, string documentId, CancellationToken cancellationToken = default); /// - /// Fetch the pipeline status from storage + /// Get pipeline status from storage /// /// Index where memory is stored /// Id of the document and pipeline execution instance /// Async task cancellation token /// Pipeline status if available - Task ReadPipelineSummaryAsync(string index, string documentId, CancellationToken cancellationToken = default); + Task GetPipelineStatusAsync(string index, string documentId, CancellationToken cancellationToken = default); /// /// Check if a document ID exists in a user memory and is ready for usage. diff --git a/service/Core/MemoryServerless.cs b/service/Core/MemoryServerless.cs index 240ddd52a..53c864dd3 100644 --- a/service/Core/MemoryServerless.cs +++ b/service/Core/MemoryServerless.cs @@ -208,8 +208,7 @@ public async Task IsDocumentReadyAsync( index = IndexName.CleanName(index, this._defaultIndexName); try { - DataPipeline? pipeline = await this._orchestrator.ReadPipelineStatusAsync(index: index, documentId, cancellationToken).ConfigureAwait(false); - return pipeline?.ToDataPipelineStatus(); + return await this._orchestrator.GetPipelineStatusAsync(index: index, documentId, cancellationToken).ConfigureAwait(false); ; } catch (PipelineNotFoundException) { diff --git a/service/Core/MemoryService.cs b/service/Core/MemoryService.cs index 5a88813da..c3fa97451 100644 --- a/service/Core/MemoryService.cs +++ b/service/Core/MemoryService.cs @@ -181,7 +181,7 @@ public Task IsDocumentReadyAsync( CancellationToken cancellationToken = default) { index = IndexName.CleanName(index, this._defaultIndexName); - return this._orchestrator.ReadPipelineSummaryAsync(index: index, documentId, cancellationToken); + return this._orchestrator.GetPipelineStatusAsync(index: index, documentId, cancellationToken); } /// diff --git a/service/Core/Pipeline/BaseOrchestrator.cs b/service/Core/Pipeline/BaseOrchestrator.cs index 0e4a36f4a..00e9f4f63 100644 --- a/service/Core/Pipeline/BaseOrchestrator.cs +++ b/service/Core/Pipeline/BaseOrchestrator.cs @@ -155,7 +155,7 @@ public DataPipeline PrepareNewDocumentUpload( } /// - public async Task ReadPipelineStatusAsync(string index, string documentId, CancellationToken cancellationToken = default) + public async Task GetPipelineAsync(string index, string documentId, CancellationToken cancellationToken = default) { index = IndexName.CleanName(index, this._defaultIndexName); @@ -193,13 +193,13 @@ public DataPipeline PrepareNewDocumentUpload( } /// - public async Task ReadPipelineSummaryAsync(string index, string documentId, CancellationToken cancellationToken = default) + public async Task GetPipelineStatusAsync(string index, string documentId, CancellationToken cancellationToken = default) { index = IndexName.CleanName(index, this._defaultIndexName); try { - DataPipeline? pipeline = await this.ReadPipelineStatusAsync(index: index, documentId: documentId, cancellationToken).ConfigureAwait(false); + DataPipeline? pipeline = await this.GetPipelineAsync(index: index, documentId: documentId, cancellationToken).ConfigureAwait(false); return pipeline?.ToDataPipelineStatus(); } catch (PipelineNotFoundException) @@ -216,7 +216,7 @@ public async Task IsDocumentReadyAsync(string index, string documentId, Ca try { this.Log.LogDebug("Checking if document {Id} on index {Index} is ready", documentId, index); - DataPipeline? pipeline = await this.ReadPipelineStatusAsync(index: index, documentId, cancellationToken).ConfigureAwait(false); + DataPipeline? pipeline = await this.GetPipelineAsync(index: index, documentId, cancellationToken).ConfigureAwait(false); if (pipeline == null) { @@ -396,7 +396,7 @@ protected async Task UploadFilesAsync(DataPipeline currentPipeline, Cancellation DataPipeline? previousPipeline; try { - previousPipeline = await this.ReadPipelineStatusAsync(currentPipeline.Index, currentPipeline.DocumentId, cancellationToken).ConfigureAwait(false); + previousPipeline = await this.GetPipelineAsync(currentPipeline.Index, currentPipeline.DocumentId, cancellationToken).ConfigureAwait(false); } catch (PipelineNotFoundException) { diff --git a/service/Core/Pipeline/DistributedPipelineOrchestrator.cs b/service/Core/Pipeline/DistributedPipelineOrchestrator.cs index 2d2e462ff..bc1a6df44 100644 --- a/service/Core/Pipeline/DistributedPipelineOrchestrator.cs +++ b/service/Core/Pipeline/DistributedPipelineOrchestrator.cs @@ -99,7 +99,7 @@ public override async Task AddHandlerAsync( DataPipeline? pipeline; try { - pipeline = await this.ReadPipelineStatusAsync(pipelinePointer.Index, pipelinePointer.DocumentId, cancellationToken).ConfigureAwait(false); + pipeline = await this.GetPipelineAsync(pipelinePointer.Index, pipelinePointer.DocumentId, cancellationToken).ConfigureAwait(false); } catch (PipelineNotFoundException) {