def sendKinesisEvent()

in app/services/AtomPublishers.scala [16:30]


  def sendKinesisEvent(atom: Atom, atomPublisher: AtomPublisher, eventType: EventType): Either[AtomAPIError, Unit] = {
    if (config.kinesisEnabled) {
      val event = ContentAtomEvent(atom, eventType, DateTime.now.getMillis)
      atomPublisher.publishAtomEvent(event) match {
        case Success(_) =>
          logger.info(s"Successfully published ${atom.id} to kinesis with $eventType")
          Right(())
        case Failure(err) =>
          logger.error(s"Failed to publish ${atom.id} to kinesis with $eventType", err)
          Left(KinesisPublishingFailed)
      }
    } else {
      Right(())
    }
  }