diff --git a/modules/services/unix/logging/analysis_alert_action_server/files/alert_actioner/alert_router.rb b/modules/services/unix/logging/analysis_alert_action_server/files/alert_actioner/alert_router.rb index fd98ffa9d..ea593fce5 100644 --- a/modules/services/unix/logging/analysis_alert_action_server/files/alert_actioner/alert_router.rb +++ b/modules/services/unix/logging/analysis_alert_action_server/files/alert_actioner/alert_router.rb @@ -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