<commit_before>class BatchSerializer
  class << self
    def run(suffix = '')
      caller_file_name = caller[0][/\/([^\/]*)\.[^\.]*:/, 1]
      caller_func_name = caller[0][/`([^']*)'/, 1]
      caller_name = "#{caller_file_name}_#{caller_func_name}#{suffix}"
      file_path = lock_file_path(caller_name)
      File.open(file_path, 'w') do |lock_file|
        if lock_file.flock(File::LOCK_EX|File::LOCK_NB)
          lock_file.puts $$
          lock_file.flush
          begin
            yield
          rescue => e
            Rails.logger.error e
          ensure
            File.delete(file_path)
          end
        else
          raise Locked<commit_msg>Fixed killer fails<commit_after>class BatchSerializer
  class << self
    def run(suffix = '')
      caller_file_name = caller[0][/\/([^\/]*)\.[^\.]*:/, 1]
      caller_func_name = caller[0][/`([^']*)'/, 1]
      caller_name = "#{caller_file_name}_#{caller_func_name}#{suffix}"
      file_path = lock_file_path(caller_name)
      File.open(file_path, 'w') do |lock_file|
        lock_file.sync = true
        if lock_file.flock(File::LOCK_EX|File::LOCK_NB)
          lock_file.puts $$
          begin
            yield
          rescue => e
            Rails.logger.error e
          ensure
            File.delete(file_path)
          end
        else
          raise Locked
{'fraction_non_alphanumeric': 0.14392244593586875, 'fraction_numerical': 0.005965697240865026, 'mean_word_length': 2.0157303370786517, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '5413147', 'n_tokens_mistral': 453, 'n_tokens_neox': 450, 'n_words': 74}