<commit_before>namespace :quick_jobs do 
  task :process => :environment do
    Rails.logger = Logger.new(ENV['LOG_FILE'] || STDOUT)
    Rails.logger.info "Starting quick_jobs processor"

    while true do
      Job.waiting.each do |job|
        begin
          Rails.logger.info "#{job.summary}"
          job.run
          Rails.logger.info "done"
        rescue Exception => e
          job.state!(:error)
          job.save
          Rails.logger.info e
        end
      end
      sleep 3
    end
  end
end<commit_msg>updated rake task to live only as long as parent<commit_after>namespace :quick_jobs do 
  task :process => :environment do
    Rails.logger = Logger.new(ENV['LOG_FILE'] || STDOUT)
    Rails.logger.info "Starting quick_jobs processor"

    while Process.ppid != 1 do
      Job.waiting.each do |job|
        begin
          Rails.logger.info "#{job.summary}"
          job.run
          Rails.logger.info "done"
        rescue Exception => e
          job.state!(:error)
          job.save
          Rails.logger.info e
        end
      end
      sleep 3
    end
  end
end
{'fraction_non_alphanumeric': 0.09414990859232175, 'fraction_numerical': 0.002742230347349177, 'mean_word_length': 1.8891820580474934, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4303577', 'n_tokens_mistral': 343, 'n_tokens_neox': 331, 'n_words': 89}