<commit_before>fail 'Please run with sudo for the sake of process running' unless Process.euid == 0

$for_a_moment = 0.5
$for_a_while = 1.0

def spawn(lib_path)
  puts "Starting #{lib_path}..."
  null_io = File.open File::NULL, 'w'
  @pids << Process.spawn("#{__dir__}/../../lib/#{lib_path}", out: null_io, err: null_io)
end

Kintama.on_start do
  @pids = []
  spawn 'queue/handler.rb'
  spawn 'queue/broadcaster.rb'
  spawn 'payload/parser.rb'
  spawn 'job/assembler.rb'
  # spawn 'in/http.rb' #Sinatra and port 80 causes a ton of problems
  # spawn 'job/worker.rb testingid'
  sleep $for_a_moment
  # sleep 5<commit_msg>Threw Sinatra back in process spawning. Seems to work for now<commit_after>fail 'Please run with sudo for the sake of process running' unless Process.euid == 0

$for_a_moment = 0.5
$for_a_while = 1.0

def spawn(lib_path)
  puts "Starting #{lib_path}..."
  null_io = File.open File::NULL, 'w'
  @pids << Process.spawn("#{__dir__}/../../lib/#{lib_path}", out: null_io, err: null_io)
end

Kintama.on_start do
  @pids = []
  spawn 'input/http.rb' # Make sure the Sinatra port is available!
  spawn 'queue/handler.rb'
  spawn 'queue/broadcaster.rb'
  spawn 'payload/parser.rb'
  spawn 'job/assembler.rb'
  # spawn 'job/worker.rb testingid'
  sleep 2
{'fraction_non_alphanumeric': 0.1429699842022117, 'fraction_numerical': 0.011058451816745656, 'mean_word_length': 3.8544061302681993, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5982049', 'n_tokens_mistral': 487, 'n_tokens_neox': 481, 'n_words': 131}