def props()

in app/com/gu/floodgate/reindex/BulkJobActor.scala [18:64]


  def props(
      contentSources: List[ContentSource],
      runningJobService: RunningJobService,
      reindexService: ReindexService,
      jobHistoryService: JobHistoryService
  ) =
    Props(new BulkJobActor(contentSources, runningJobService, reindexService, jobHistoryService))

  //  Incoming messages
  case object StartBulkReindex
  case object IsActorReindexing
  case class DropPendingJob(id: String, env: String)

  case class RunningJobInfo(
      name: String,
      id: String,
      env: String,
      documentsIndexed: Int,
      documentsExpected: Int,
      startTime: DateTime,
      settings: ContentSourceSettings
  )
  case class PendingJobInfo(name: String, id: String, env: String)
  case class CompletedJobInfo(
      name: String,
      id: String,
      env: String,
      startTime: DateTime,
      finishTime: DateTime,
      status: ReindexStatus,
      documentsIndexed: Option[Int],
      documentsExpected: Option[Int]
  )
  object CompletedJobInfo {
    def apply(source: ContentSource, history: JobHistory): CompletedJobInfo = {
      CompletedJobInfo(
        source.appName,
        source.id,
        source.environment,
        history.startTime,
        history.finishTime,
        history.status,
        history.documentsExpected,
        history.documentsIndexed
      )
    }
  }