Skip to content

Commit

Permalink
updating updated at field on alerts_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
IDoneShaveIt committed Jan 17, 2024
1 parent c4dc0ad commit bc2b988
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% if execute %}
{% if alert_ids %}
{% set update_sent_alerts_query %}
UPDATE {{ ref('elementary_cli', 'alerts_v2') }} set status = 'sent', sent_at = {{ elementary.edr_quote(sent_at) }}
UPDATE {{ ref('elementary_cli', 'alerts_v2') }} set status = 'sent', sent_at = {{ elementary.edr_quote(sent_at) }}, updated_at = {{ elementary.edr_current_timestamp() }}
WHERE alert_id IN {{ elementary.strings_list_to_tuple(alert_ids) }} and status = 'pending' and
{{ elementary.edr_cast_as_timestamp('detected_at') }} >= {{ elementary_cli.get_alerts_time_limit() }}
{% endset %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% if execute %}
{% if alert_ids %}
{% set update_skipped_alerts_query %}
UPDATE {{ ref('elementary_cli', 'alerts_v2') }} set status = 'skipped'
UPDATE {{ ref('elementary_cli', 'alerts_v2') }} set status = 'skipped', updated_at = {{ elementary.edr_current_timestamp() }}
WHERE alert_id IN {{ elementary.strings_list_to_tuple(alert_ids) }} and status = 'pending' and
{{ elementary.edr_cast_as_timestamp('detected_at') }} >= {{ elementary_cli.get_alerts_time_limit() }}
{% endset %}
Expand Down

0 comments on commit bc2b988

Please sign in to comment.