Skip to content

Commit

Permalink
Refactor DataPipelineStatus and DataPipeline classes (#870)
Browse files Browse the repository at this point in the history
Removed the `Failed` property from `DataPipelineStatus`.

## Motivation and Context (Why the change? What's the scenario?)
See #709
  • Loading branch information
marcominerva authored Oct 30, 2024
1 parent f0bdc95 commit 13d2178
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
5 changes: 0 additions & 5 deletions service/Abstractions/Models/DataPipelineStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,8 @@ public class DataPipelineStatus
[JsonPropertyName("completed")]
public bool Completed { get; set; } = false;

[JsonPropertyOrder(1)]
[JsonPropertyName("failed")]
public bool Failed { get; set; } = false;

/// <summary>
/// Currently used to track deleted documents.
/// TODO: replace with "isDeleting" and "Deleted"
/// </summary>
[JsonPropertyOrder(2)]
[JsonPropertyName("empty")]
Expand Down
7 changes: 1 addition & 6 deletions service/Abstractions/Pipeline/DataPipeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,7 @@ public void MarkProcessedBy(IPipelineStepHandler handler, string? subStep = null
/// <param name="text">Text to store for the end user</param>
public void Log(IPipelineStepHandler handler, string text)
{
if (this.LogEntries == null)
{
this.LogEntries = new List<PipelineLogEntry>();
}

this.LogEntries ??= [];
this.LogEntries.Add(new PipelineLogEntry(source: handler.StepName, text: text));
}
}
Expand Down Expand Up @@ -438,7 +434,6 @@ public DataPipelineStatus ToDataPipelineStatus()
return new DataPipelineStatus
{
Completed = this.Complete,
Failed = false, // TODO
Empty = this.Files.Count == 0,
Index = this.Index,
DocumentId = this.DocumentId,
Expand Down

0 comments on commit 13d2178

Please sign in to comment.