private def onFailure()

in app/com/gu/floodgate/reindex/ProgressTracker.scala [111:120]


  private def onFailure(contentSource: ContentSource, runningJob: RunningJob): Unit = {
    if (FailedAttemptsToRetrieveProgressLimit == failedAttemptsToRetrieveProgress) {
      failedAttemptsToRetrieveProgress = 0
      logger.warn(s"Failing reindex after $failedAttemptsToRetrieveProgress failed attempts to get progress")
      completeProgressTracking(Failed, contentSource, runningJob)
    } else {
      failedAttemptsToRetrieveProgress += 1
      scheduleNextUpdate(contentSource, runningJob)
    }
  }