Skip to content

Commit

Permalink
add lastTriggerDate
Browse files Browse the repository at this point in the history
  • Loading branch information
ersin-erdal committed Aug 9, 2022
1 parent a3070fc commit 3b41ff4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/alerting/server/task_runner/task_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -921,14 +921,14 @@ export class TaskRunner<
ruleRunMetricsStore.incrementNumberOfTriggeredActions();
ruleRunMetricsStore.incrementNumberOfTriggeredActionsByConnectorType(action.actionTypeId);

actionsToTrigger.push(action);
actionsToTrigger.push({ ...action, lastTriggerDate: new Date().toISOString() });
}

await Promise.all(
actionsToTrigger.map(async (action) => {
const enqueueOptions = {
id: action.id,
params: { ...action.params, lastTriggerDate: new Date().toISOString() },
params: action.params,
spaceId,
apiKey: apiKey ?? null,
consumer: this.ruleConsumer!,
Expand Down

0 comments on commit 3b41ff4

Please sign in to comment.