lib/good_job/notifier.rb in good_job-3.27.1 vs lib/good_job/notifier.rb in good_job-3.27.2

- old
+ new

@@ -48,11 +48,11 @@ thread_cattr_accessor :connection # Send a message via Postgres NOTIFY # @param message [#to_json] def self.notify(message) - connection = Execution.connection + connection = ::GoodJob::Execution.connection connection.exec_query <<~SQL.squish NOTIFY #{CHANNEL}, #{connection.quote(message.to_json)} SQL end @@ -246,11 +246,11 @@ @task end def with_connection Rails.application.executor.wrap do - self.connection = Execution.connection_pool.checkout.tap do |conn| - Execution.connection_pool.remove(conn) + self.connection = ::GoodJob::Execution.connection_pool.checkout.tap do |conn| + ::GoodJob::Execution.connection_pool.remove(conn) end end connection.execute("SET application_name = #{connection.quote(self.class.name)}") yield