<commit_before>require 'newrelic_rpm'

class ApplicationJob < ActiveJob::Base
  around_perform :use_db_pool

  rescue_from(StandardError) do |e|
    NewRelic::Agent.notice_error(e)
  end

  def use_db_pool(job)
    ActiveRecord::Base.connection_pool.with_connection do
      yield
    end
  end
end<commit_msg>block syntax for around perform<commit_after>require 'newrelic_rpm'

class ApplicationJob < ActiveJob::Base

  rescue_from(StandardError) do |e|
    NewRelic::Agent.notice_error(e)
  end

  around_perform do |job, block|
    ActiveRecord::Base.connection_pool.with_connection do
      block.call
    end
  end
end
{'fraction_non_alphanumeric': 0.07865168539325842, 'fraction_numerical': 0.0, 'mean_word_length': 4.571428571428571, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5419609', 'n_tokens_mistral': 210, 'n_tokens_neox': 205, 'n_words': 43}