diff --git a/lib/ragios/events/worker.rb b/lib/ragios/events/worker.rb index 65a5eddb..1e346ee8 100644 --- a/lib/ragios/events/worker.rb +++ b/lib/ragios/events/worker.rb @@ -7,6 +7,7 @@ def perform(options) puts options.inspect @event = JSON.parse(options, symbolize_names: true) log_event + terminate end private diff --git a/lib/ragios/monitors/workers/worker.rb b/lib/ragios/monitors/workers/worker.rb index 1d632b37..19be8d94 100644 --- a/lib/ragios/monitors/workers/worker.rb +++ b/lib/ragios/monitors/workers/worker.rb @@ -17,6 +17,7 @@ def perform(monitor_id) type: "event", event_type: "monitor.test" ) + terminate rescue Exception => e log_error(e, generic_monitor) raise e diff --git a/lib/ragios/notifications/notify_worker.rb b/lib/ragios/notifications/notify_worker.rb index 24d8c711..9d0c4160 100644 --- a/lib/ragios/notifications/notify_worker.rb +++ b/lib/ragios/notifications/notify_worker.rb @@ -21,13 +21,13 @@ def perform(event, monitor, test_result, notifier) publisher.async.log_event!( event_details.merge(event: occurred) ) - + terminate rescue Exception => exception - raise occurred = {"notifier error" => exception.message} publisher.async.log_event!( event_details.merge(event: occurred) ) + raise exception end private