From 9bf1f42de0ae21e43fdd3842ebf04c00a133ebca Mon Sep 17 00:00:00 2001 From: Samuel Cochran Date: Wed, 26 Aug 2020 01:08:22 +1000 Subject: [PATCH] Lint rules lib/good_job/scheduler.rb:140:76: C: Style/SymbolProc: Pass &:next as an argument to new instead of a block. future = Concurrent::Future.new(args: [@performer], executor: @pool) do |performer| ... ^^^^^^^^^^^^^^ Although I'm not sure I find this cleaner. --- lib/good_job/scheduler.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/good_job/scheduler.rb b/lib/good_job/scheduler.rb index 7a5b1e338..061420ca8 100644 --- a/lib/good_job/scheduler.rb +++ b/lib/good_job/scheduler.rb @@ -137,9 +137,7 @@ def create_thread(state = nil) return false unless @performer.next?(state) end - future = Concurrent::Future.new(args: [@performer], executor: @pool) do |performer| - performer.next - end + future = Concurrent::Future.new(args: [@performer], executor: @pool, &:next) future.add_observer(self, :task_observer) future.execute