From 8dd4f9c5b493d09137972c6efa61cc31846a9c41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stas=20SU=C8=98COV?= Date: Sun, 10 Jan 2021 18:12:11 +0000 Subject: [PATCH 1/2] Fixes for Ruby v3. Remove the rescue block. It's not needed and makes it really hard to trace the issues. --- bin/command_line_interface.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/bin/command_line_interface.rb b/bin/command_line_interface.rb index 131fc10b..9317e3e7 100644 --- a/bin/command_line_interface.rb +++ b/bin/command_line_interface.rb @@ -219,13 +219,7 @@ def parse( options[:poll_interval] = poll_interval - locker = - begin - Que::Locker.new(options) - rescue => e - output.puts(e.message) - return 1 - end + locker = Que::Locker.new(**options) # It's a bit sloppy to use a global for this when a local variable would # do, but we want to stop the locker from the CLI specs, so... From b1cc44cce8426af0095467d5a20d523547ae4a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stas=20SU=C8=98COV?= Date: Tue, 23 Feb 2021 14:30:29 +0000 Subject: [PATCH 2/2] Moar ruby v3 compatibility. --- lib/que/worker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/que/worker.rb b/lib/que/worker.rb index a3bcc2d0..27d34b2f 100644 --- a/lib/que/worker.rb +++ b/lib/que/worker.rb @@ -118,7 +118,7 @@ def work_job(metajob) log_message[:event] = :job_worked end - Que.log(log_message) + Que.log(**log_message) end instance