From 52b0c5ea676c406fb2815fd5031dbdcf20f40b88 Mon Sep 17 00:00:00 2001 From: Adam Rodrigues Date: Thu, 28 Mar 2024 11:06:32 -0400 Subject: [PATCH] rescue exception --- lib/que/job_methods.rb | 2 +- lib/que/worker.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/que/job_methods.rb b/lib/que/job_methods.rb index 892b9ce4..68b5a4a7 100644 --- a/lib/que/job_methods.rb +++ b/lib/que/job_methods.rb @@ -70,7 +70,7 @@ def _run(args: nil, kwargs: nil, reraise_errors: false) message: 'Run completed', ) default_resolve_action if que_target && !que_target.que_resolved - rescue => error + rescue Exception => error Que.log( level: :info, event: :special_job_errored, diff --git a/lib/que/worker.rb b/lib/que/worker.rb index 30acdecf..b580778e 100644 --- a/lib/que/worker.rb +++ b/lib/que/worker.rb @@ -44,7 +44,7 @@ def initialize( Thread.current.abort_on_exception = true start_callback.call(self) if start_callback.respond_to?(:call) work_loop - rescue => error + rescue Exception => error Que.log( level: :info, event: :worker_crashed,