sleep value + disabling web_actioner for demo

This commit is contained in:
thomashaw
2022-10-19 21:18:54 +01:00
parent 51ab148ae2
commit 6132007ab3
2 changed files with 5 additions and 1 deletions

View File

@@ -16,6 +16,10 @@ class WebActioner < AlertActioner
end
def perform_action
Print.info "WebActioner disabled for testing - uncomment me when pushed to Hacktivity (web_actioner.rb:19)"
end
def perform_actions
Print.info "Running WebActioner", logger
# uri = URI.parse("http://www.google.com")
uri = URI.parse(self.target_host)

View File

@@ -28,7 +28,6 @@ def run_alert_actions(db_conn, alert_name)
@alert_actioners.each do |alert_actioner|
if alert_actioner.alert_name == alert_name
if alert_actioner.last_actioned == nil
# TODO: uncomment before pushing for testing
alert_actioner.action_alert
alert_actioner.status = 'actioned'
else
@@ -156,6 +155,7 @@ def start
run_alert_actions(db_conn, result['alert_name'])
end
end
sleep 0.25 # TODO: Tweak this value
end
end