Skip to content

Commit

Permalink
Fix invalid cast from SecureIndexClient to NodeClient
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRuiz7 committed Oct 2, 2024
1 parent b165294 commit 857fe79
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import org.opensearch.reportsscheduler.index.ReportInstancesIndex
import org.opensearch.reportsscheduler.model.ReportDefinitionDetails
import org.opensearch.reportsscheduler.model.ReportInstance
import org.opensearch.reportsscheduler.util.NotificationApiUtils.getNotificationConfigInfo
import org.opensearch.reportsscheduler.util.SecureIndexClient
import org.opensearch.reportsscheduler.util.buildReportLink
import org.opensearch.reportsscheduler.util.logger
import org.opensearch.reportsscheduler.util.sendNotificationWithHTML
Expand All @@ -43,7 +42,7 @@ internal object ReportDefinitionJobRunner : ScheduledJobRunner {
* @param clusterService The ES cluster service
*/
fun initialize(client: Client, clusterService: ClusterService) {
this.client = SecureIndexClient(client)
this.client = client
this.clusterService = clusterService
}

Expand All @@ -65,7 +64,7 @@ internal object ReportDefinitionJobRunner : ScheduledJobRunner {
val htmlWithURL: String? =
htmlMessage?.replace("{{urlDefinition}}", urlDefinition)?.replace("{{hits}}", hits.toString())

log.info("esto es el mensaje html $htmlMessage")
log.debug("HTML message: $htmlMessage") // TODO remove
configInfo.sendNotificationWithHTML(
this.client,
title,
Expand Down

0 comments on commit 857fe79

Please sign in to comment.