<commit_before>require 'bunny'
namespace :rabbit do
  task consume: :environment do
    conn = Bunny.new(ENV['RABBITMQ_BIGWIG_RX_URL'])
    conn.start
    ch   = conn.create_channel
    q    = ch.queue("message")
    puts "waiting for messages..."

    # Wait for a message from the queue
    q.subscribe(:block => true) do |delivery_info, properties, body|
      puts " [x] Received #{body}"
      @d = Data.new
      obj = JSON.parse(body)<commit_msg>response model 2<commit_after>require 'bunny'
namespace :rabbit do
  task consume: :environment do
    conn = Bunny.new(ENV['RABBITMQ_BIGWIG_RX_URL'])
    conn.start
    ch   = conn.create_channel
    q    = ch.queue("message")
    puts "waiting for messages..."

    # Wait for a message from the queue
    q.subscribe(:block => true) do |delivery_info, properties, body|
      puts " [x] Received #{body}"
      @d = Response.new
      obj = JSON.parse(body)
{'fraction_non_alphanumeric': 0.12048192771084337, 'fraction_numerical': 0.001095290251916758, 'mean_word_length': 3.026431718061674, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2719355', 'n_tokens_mistral': 306, 'n_tokens_neox': 299, 'n_words': 83}