fix(ansible): persist scheduled candidate incidents
This commit is contained in:
@@ -84,6 +84,7 @@ SignalSource = Literal[
|
||||
"node-exporter",
|
||||
"sensor-probe",
|
||||
"sensor-agent",
|
||||
"iwooos_scheduler",
|
||||
]
|
||||
SIGNAL_SOURCE_VALUES: frozenset[str] = frozenset(get_args(SignalSource))
|
||||
|
||||
|
||||
@@ -1520,7 +1520,11 @@ async def _ensure_ansible_incident_ledger_with_db(
|
||||
proposal_ids,
|
||||
alertname,
|
||||
notification_type,
|
||||
alert_category
|
||||
alert_category,
|
||||
created_at,
|
||||
updated_at,
|
||||
ttl_days,
|
||||
vectorized
|
||||
) VALUES (
|
||||
:incident_id,
|
||||
:project_id,
|
||||
@@ -1532,7 +1536,11 @@ async def _ensure_ansible_incident_ledger_with_db(
|
||||
CAST('[]' AS json),
|
||||
:alertname,
|
||||
:notification_type,
|
||||
:alert_category
|
||||
:alert_category,
|
||||
NOW(),
|
||||
NOW(),
|
||||
7,
|
||||
FALSE
|
||||
)
|
||||
ON CONFLICT (incident_id) DO NOTHING
|
||||
RETURNING incident_id
|
||||
|
||||
Reference in New Issue
Block a user