Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor DataPipelineStatus and DataPipeline classes #870

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions service/Abstractions/Models/DataPipelineStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@ 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)]
[JsonPropertyOrder(1)]
dluc marked this conversation as resolved.
Show resolved Hide resolved
[JsonPropertyName("empty")]
public bool Empty { get; set; } = false;

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
Loading