<commit_before># Run with: rackup private_pub.ru -s thin -E production
require "bundler/setup"
require "yaml"
require "faye"
require "private_pub"

PrivatePub.load_config(File.expand_path("../config/private_pub.yml", __FILE__), ENV["RAILS_ENV"] || "development")

path = Rails.root.join("config/private_pub_redis.yml")
options = path.exist? ? PrivatePub.load_redis_config(path, Rails.env) : {}

run PrivatePub.faye_app(options)<commit_msg>Added some debugging<commit_after># Run with: rackup private_pub.ru -s thin -E production
require "bundler/setup"
require "yaml"
require "faye"
require "private_pub"

PrivatePub.load_config(File.expand_path("../config/private_pub.yml", __FILE__), ENV["RAILS_ENV"] || "development")

path = Rails.root.join("config/private_pub_redis.yml")

puts "loading redis config: " + path.inspect
puts File.expand_path("../config/private_pub.yml", __FILE__).inspect

options = path.exist? ? PrivatePub.load_redis_config(File.expand_path("../config/private_pub.yml", __FILE__), Rails.env) : {}

run PrivatePub.faye_app(options)
{'fraction_non_alphanumeric': 0.1482889733840304, 'fraction_numerical': 0.0, 'mean_word_length': 6.415492957746479, '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': '3308866', 'n_tokens_mistral': 378, 'n_tokens_neox': 363, 'n_words': 68}