Skip to content
Snippets Groups Projects
Commit 0090b189 authored by apriestman's avatar apriestman
Browse files

Use original start time if no pipelines are running

parent 2b034c65
Branches
Tags
No related merge requests found
......@@ -1484,16 +1484,17 @@ IngestJobProgressSnapshot getIngestJobProgressSnapshot(boolean includeIngestTask
boolean fileIngestRunning = false;
Date fileIngestStartTime = null;
Optional<List<FileIngestPipeline>> fileIngestPipelines = getCurrentFileIngestPipelines();
if (fileIngestPipelines.isPresent()) {
for (FileIngestPipeline pipeline : fileIngestPipelines.get()) {
if (pipeline.isRunning()) {
fileIngestRunning = true;
}
Date pipelineStartTime = pipeline.getStartTime();
if (pipelineStartTime != null && (fileIngestStartTime == null || pipelineStartTime.before(fileIngestStartTime))) {
fileIngestStartTime = pipelineStartTime;
}
if (!fileIngestPipelines.isPresent()) {
// If there are no currently running pipelines, use the original set.
fileIngestPipelines = Optional.of(ingestModuleTiers.get(0).getFileIngestPipelines());
}
for (FileIngestPipeline pipeline : fileIngestPipelines.get()) {
if (pipeline.isRunning()) {
fileIngestRunning = true;
}
Date pipelineStartTime = pipeline.getStartTime();
if (pipelineStartTime != null && (fileIngestStartTime == null || pipelineStartTime.before(fileIngestStartTime))) {
fileIngestStartTime = pipelineStartTime;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment