<commit_before># Delayed::Worker.destroy_failed_jobs = false
# Delayed::Worker.sleep_delay = 60
# Delayed::Worker.max_attempts = 3
# Delayed::Worker.max_run_time = 5.minutes
# Delayed::Worker.read_ahead = 10
# Delayed::Worker.default_queue_name = 'default'
# Delayed::Worker.delay_jobs = !Rails.env.test?
# Delayed::Worker.raise_signal_exceptions = :term
Delayed::Worker.logger = Logger.new(File.join(Rails.root, 'log', 'delayed_job.log'))

if Rails.env.production? && Delayed::Job.column_names.include?('cron')
  if Rails.configuration.datamailcollector
    CollectDataFromMailJob.set(cron: '*/15 * * * *').perform_later if Delayed::Job.where("handler like ?", "%CollectDataFromMailJob%").empty?
  else
    Delayed::Job.where("handler like ?", "%CollectDataFromMailJob%").destroy_all
  end
  if Rails.configuration.datacollector
    CollectDataFromDevicesJob.set(cron: '*/5 * * * *').perform_later if Delayed::Job.where("handler like ?", "%CollectDataFromDevicesJob%").empty?
  else
    Delayed::Job.where("handler like ?", "%CollectDataFromDevicesJob%").destroy_all
  end
end<commit_msg>delayed job init changed conditions on config<commit_after># Delayed::Worker.destroy_failed_jobs = false
# Delayed::Worker.sleep_delay = 60
# Delayed::Worker.max_attempts = 3
# Delayed::Worker.max_run_time = 5.minutes
# Delayed::Worker.read_ahead = 10
# Delayed::Worker.default_queue_name = 'default'
# Delayed::Worker.delay_jobs = !Rails.env.test?
# Delayed::Worker.raise_signal_exceptions = :term
Delayed::Worker.logger = Logger.new(File.join(Rails.root, 'log', 'delayed_job.log'))

if Rails.env.production? && Delayed::Job.column_names.include?('cron')
  if Rails.configuration.respond_to?(:datamailcollector)
    CollectDataFromMailJob.set(cron: '*/15 * * * *').perform_later if Delayed::Job.where("handler like ?", "%CollectDataFromMailJob%").empty?
  else
    Delayed::Job.where("handler like ?", "%CollectDataFromMailJob%").destroy_all
  end

  if Rails.configuration.respond_to?(:datacollector)
    CollectDataFromDevicesJob.set(cron: '*/5 * * * *').perform_later if Delayed::Job.where("handler like ?", "%CollectDataFromDevicesJob%").empty?
  else
    Delayed::Job.where("handler like ?", "%CollectDataFromDevicesJob%").destroy_all
  end
end
{'fraction_non_alphanumeric': 0.15631978561857973, 'fraction_numerical': 0.0080393032603841, 'mean_word_length': 6.466666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1874036', 'n_tokens_mistral': 805, 'n_tokens_neox': 745, 'n_words': 111}