From 20e8e83ab601168214974333e69a2968970a9c2a Mon Sep 17 00:00:00 2001 From: f Date: Mon, 10 Apr 2023 13:28:01 -0300 Subject: [PATCH] feat: notificar errores de que --- config/initializers/que.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 config/initializers/que.rb diff --git a/config/initializers/que.rb b/config/initializers/que.rb new file mode 100644 index 00000000..d7abfeb5 --- /dev/null +++ b/config/initializers/que.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +ActiveJob::Serializers.add_serializers ActiveJob::Serializers::ExceptionSerializer + +# Notificar los errores +Que.error_notifier = proc do |error, job| + ExceptionNotifier.notify_exception(error, data: (job || {})) +end