def sendToPluto()

in common/src/main/scala/com/gu/media/upload/PlutoUploadActions.scala [13:36]


  def sendToPluto(plutoIntegrationMessage: PlutoIntegrationMessage): Unit = {

    sendKinesisMessage(plutoIntegrationMessage)

    plutoIntegrationMessage match {
      case plutoData: PlutoSyncMetadataMessage if plutoData.projectId.isEmpty => {
        plutoStore.put(plutoData)

        val shouldSendEmailReminder = plutoData.user != config.integrationTestUser && config.syncWithPluto

        if (shouldSendEmailReminder) {
          log.info(s"Sending missing Pluto ID email user=${plutoData.user} atom=${plutoData.atomId}")

          mailer.sendPlutoIdMissingEmail(
            plutoData.atomId,
            plutoData.title,
            plutoData.user
          )
        }
      }
      case _=>
        //there is nothing extra to do for AtomAssignedProjectMessage, PacFileMessage, or PlutoResyncMetadataMessage
    }
  }