Skip to content

Commit

Permalink
Lint rules
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sj26 committed Aug 25, 2020
1 parent e728615 commit 9bf1f42
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/good_job/scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9bf1f42

Please sign in to comment.