<commit_before>unless Rails.env.test?

  register_thread = Thread.new do
    NATS.start(:uri => Settings.message_bus_servers) do
      registrar.register_with_router
    end
  end

  Kernel.at_exit do
    register_thread.kill
    register_thread.join

    NATS.start(:uri => Settings.message_bus_servers) do<commit_msg>Increased the maximum retries for NATs reconnect. [#66169850]<commit_after>unless Rails.env.test?

  max_fixnum = (2**(0.size * 8 -2) -1)

  register_thread = Thread.new do
    NATS.start(:uri => Settings.message_bus_servers, :max_reconnect_attempts => max_fixnum) do
      registrar.register_with_router
    end
  end

  Kernel.at_exit do
    register_thread.kill
    register_thread.join

    NATS.start(:uri => Settings.message_bus_servers) do
{'fraction_non_alphanumeric': 0.09281045751633987, 'fraction_numerical': 0.01699346405228758, 'mean_word_length': 3.878980891719745, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '655239', 'n_tokens_mistral': 272, 'n_tokens_neox': 255, 'n_words': 49}