<commit_before>require 'plezi/websockets/message_dispatch' unless defined?(::Plezi::Base::MessageDispatch)

module Plezi
   protected

  @plezi_finalize = nil
  def plezi_finalize
     if @plezi_finalize.nil?
        @plezi_finalize = true
        @plezi_finalize = 1
     end
  end
  @plezi_initialize = nil
  def self.plezi_initialize
     if @plezi_initialize.nil?
        @plezi_initialize = true
        self.hash_proc_4symstr # crerate the Proc object used for request params
        @plezi_autostart = true if @plezi_autostart.nil?
        if ENV['PL_REDIS_URL'.freeze] && !defined?(::Redis)
          puts "WARNNING: auto-scaling with redis is set using ENV['PL_REDIS_URL'.freeze]\r\n           but the Redis gem isn't included! - SCALING IS IGNORED!"
          ::Iodine.processes ||= 1
        end
        ::Iodine.processes ||= 4
        at_exit do
           next if @plezi_autostart == false
           ::Iodine::Rack.app = ::Plezi.app
           ::Iodine.start
        end
     end
     true
  end
end

::Iodine.threads ||= 16
# ::Iodine.processes ||= (ENV['PL_REDIS_URL'.freeze] ? 4 : 1)
::Iodine.run { ::Plezi::Base::MessageDispatch._init }
<commit_msg>Make sure there's a redis url before leveraging iodine workers<commit_after>require 'plezi/websockets/message_dispatch' unless defined?(::Plezi::Base::MessageDispatch)

module Plezi
   protected

  @plezi_finalize = nil
  def plezi_finalize
     if @plezi_finalize.nil?
        @plezi_finalize = true
        @plezi_finalize = 1
     end
  end
  @plezi_initialize = nil
  def self.plezi_initialize
     if @plezi_initialize.nil?
        @plezi_initialize = true
        self.hash_proc_4symstr # crerate the Proc object used for request params
        @plezi_autostart = true if @plezi_autostart.nil?
        if ENV['PL_REDIS_URL'.freeze] && !defined?(::Redis)
          puts "WARNNING: auto-scaling with redis is set using ENV['PL_REDIS_URL'.freeze]\r\n           but the Redis gem isn't included! - SCALING IS IGNORED!"
          ::Iodine.processes ||= 1
        elsif !ENV['PL_REDIS_URL'.freeze]
          ::Iodine.processes ||= 1
        end
        ::Iodine.processes ||= 4
        at_exit do
           next if @plezi_autostart == false
           ::Iodine::Rack.app = ::Plezi.app
           ::Iodine.start
        end
     end
     true
  end
end

::Iodine.threads ||= 16
# ::Iodine.processes ||= (ENV['PL_REDIS_URL'.freeze] ? 4 : 1)
::Iodine.run { ::Plezi::Base::MessageDispatch._init }

{'fraction_non_alphanumeric': 0.11007311129163282, 'fraction_numerical': 0.006904955320877335, 'mean_word_length': 2.681614349775785, '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': '6924194', 'n_tokens_mistral': 876, 'n_tokens_neox': 853, 'n_words': 189}