<commit_before>if Rails.env.production?
  def fire_up_those_scheduled_tasks!
    Rails.logger.info "Firing up scheduled tasks..."

    Thread.new do
      timers = Timers::Group.new
      timers.every(1.minute) { BatchUserPoller.perform }
      loop { timers.wait }
    end
  end

  # Ensure the jobs run only in a web server.
  if defined?(Rack::Server)
    fire_up_those_scheduled_tasks!

  # Make this thing work in Passenger, too.
  elsif defined?(PhusionPassenger)
    PhusionPassenger.on_event(:starting_worker_process) do |forked|
      fire_up_those_scheduled_tasks!
    end
  end
end<commit_msg>Log an error message if scheduler thread can't be started.<commit_after>if Rails.env.production?
  def fire_up_those_scheduled_tasks!
    Rails.logger.info "Firing up scheduled tasks..."

    Thread.new do
      timers = Timers::Group.new
      timers.every(1.minute) { BatchUserPoller.perform }
      loop { timers.wait }
    end
  end

  # Ensure the jobs run only in a web server.
  if defined?(Rack::Server)
    fire_up_those_scheduled_tasks!

  # Make this thing work in Passenger, too.
  elsif defined?(PhusionPassenger)
    PhusionPassenger.on_event(:starting_worker_process) do |forked|
      fire_up_those_scheduled_tasks!
    end

  # When we get here, we couldn't start up the background task. Shit!
  elsif
    Rails.logger.error "Failed to start scheduler thread. Polling disabled."
  end
end
{'fraction_non_alphanumeric': 0.0801987224982257, 'fraction_numerical': 0.0014194464158978, 'mean_word_length': 3.4761904761904763, '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': '6186467', 'n_tokens_mistral': 477, 'n_tokens_neox': 459, 'n_words': 123}