diff --git a/timeseries/src/main/scala/com/criteo/cuttle/timeseries/TimeSeriesScheduler.scala b/timeseries/src/main/scala/com/criteo/cuttle/timeseries/TimeSeriesScheduler.scala index eace53514..720d860af 100644 --- a/timeseries/src/main/scala/com/criteo/cuttle/timeseries/TimeSeriesScheduler.scala +++ b/timeseries/src/main/scala/com/criteo/cuttle/timeseries/TimeSeriesScheduler.scala @@ -349,11 +349,9 @@ case class TimeSeriesScheduler(logger: Logger) extends Scheduler[TimeSeries] wit (execution.job, execution.context, result) } - Future.firstCompletedOf( - utils.Timeout(ScalaDuration.create(1, "s")) :: newRunning.map(_._3).toList) - .andThen { - case _ => mainLoop(newRunning ++ stillRunning) - } + utils.Timeout(ScalaDuration.create(1, "s")).andThen { + case _ => mainLoop(newRunning) + } } mainLoop(Set.empty)