This commit is contained in:
thomashaw
2022-07-10 16:12:57 +01:00
parent d8b2537b50
commit bf0131faa2

View File

@@ -73,9 +73,8 @@ def populate_db(db_conn)
else
@alert_actioners.each_with_index do |actioner, count|
statement = "insert_row_#{count}"
id = db_conn.prepare(statement, 'insert into alert_events (alert_name, status, last_actioned) values ($1, $2, $3) returning id')
result = db_conn.exec_prepared(statement, [actioner.alert_name, actioner.status, actioner.last_actioned])
actioner.db_id = id
db_conn.prepare(statement, 'insert into alert_events (alert_name, status, last_actioned) values ($1, $2, $3) returning id')
actioner.db_id = db_conn.exec_prepared(statement, [actioner.alert_name, actioner.status, actioner.last_actioned])
Print.info("Successfully added AlertAction to DB. \n\tID: " + actioner.db_id + "\n\talert_name: " + actioner.alert_name, logger)
end
end