diff --git a/timeseries/src/main/scala/com/criteo/cuttle/timeseries/TimeSeriesApp.scala b/timeseries/src/main/scala/com/criteo/cuttle/timeseries/TimeSeriesApp.scala index 913f17204..cd8be7fc9 100644 --- a/timeseries/src/main/scala/com/criteo/cuttle/timeseries/TimeSeriesApp.scala +++ b/timeseries/src/main/scala/com/criteo/cuttle/timeseries/TimeSeriesApp.scala @@ -143,6 +143,9 @@ private[timeseries] trait TimeSeriesApp { self: TimeSeriesScheduler => } val allFailing = executor.allFailingExecutions + val allWaitingIds = executor.allRunning + .filter(_.status == ExecutionWaiting) + .map(_.id) def findAggregationLevel(n: Int, gridView: TimeSeriesGridView, @@ -180,7 +183,7 @@ private[timeseries] trait TimeSeriesApp { self: TimeSeriesScheduler => case Running(e) => if (allFailing.exists(_.id == e)) "failed" - else if (executor.platforms.exists(_.waiting.exists(_.id == e))) + else if (allWaitingIds.contains(e)) "waiting" else "running" case Todo(_) => "todo"