Skip to content

Commit

Permalink
.. and really all we want is a connection
Browse files Browse the repository at this point in the history
ActiveJob takes care of invoking a full executor around the actual piece
of work which will invoke code reloading etc.
  • Loading branch information
sj26 committed Aug 25, 2020
1 parent cf0d799 commit 029c146
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/good_job/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def self.perform_with_advisory_lock
result = nil
error = nil

Rails.application.executor.wrap do
connection_pool.with_connection do
unfinished.priority_ordered.only_scheduled.limit(1).with_advisory_lock do |good_jobs|
good_job = good_jobs.first
break unless good_job
Expand Down

0 comments on commit 029c146

Please sign in to comment.