Skip to content

Commit

Permalink
change transport ack alerts action to accept Action Request and recre…
Browse files Browse the repository at this point in the history
…ate as AckAlertRequest (opensearch-project#618) (opensearch-project#619)

Signed-off-by: Surya Sashank Nistala <[email protected]>

Signed-off-by: Surya Sashank Nistala <[email protected]>
(cherry picked from commit 2005185fcbbd36e41dc8344ab5a8c717c3043a1a)

Co-authored-by: Surya Sashank Nistala <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and eirsep authored Oct 20, 2022
1 parent a3e6a1c commit 7e36861
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import kotlinx.coroutines.launch
import org.apache.logging.log4j.LogManager
import org.opensearch.ResourceNotFoundException
import org.opensearch.action.ActionListener
import org.opensearch.action.ActionRequest
import org.opensearch.action.bulk.BulkRequest
import org.opensearch.action.bulk.BulkResponse
import org.opensearch.action.delete.DeleteRequest
Expand Down Expand Up @@ -65,7 +66,7 @@ class TransportAcknowledgeAlertAction @Inject constructor(
val settings: Settings,
val xContentRegistry: NamedXContentRegistry,
val transportGetMonitorAction: TransportGetMonitorAction
) : HandledTransportAction<AcknowledgeAlertRequest, AcknowledgeAlertResponse>(
) : HandledTransportAction<ActionRequest, AcknowledgeAlertResponse>(
AlertingActions.ACKNOWLEDGE_ALERTS_ACTION_NAME, transportService, actionFilters, ::AcknowledgeAlertRequest
) {

Expand All @@ -78,7 +79,7 @@ class TransportAcknowledgeAlertAction @Inject constructor(

override fun doExecute(
task: Task,
acknowledgeAlertRequest: AcknowledgeAlertRequest,
acknowledgeAlertRequest: ActionRequest,
actionListener: ActionListener<AcknowledgeAlertResponse>
) {
val request = acknowledgeAlertRequest as? AcknowledgeAlertRequest
Expand Down

0 comments on commit 7e36861

Please sign in to comment.