<commit_before>namespace :fact_graph do
  task :recalculate => :environment do
    
    `echo "#{Process.pid}" > /var/lock/monit/fact_graph/fact_graph_recalculate.pid`
    `echo "#{Process.ppid}" > /var/lock/monit/fact_graph/fact_graph_recalculate.ppid`
    
    
    STDOUT.flush
    sleep_time = 0.5
    puts "now recalculating with interval of #{sleep_time} seconds"  
    while true
      #print "(#{Time.now.asctime}) recalculating FactGraph\n"
      FactGraph.recalculate
      #print "(#{Time.now.asctime}) sleeping\n"<commit_msg>Fact Graph recalculate every 10 seconds<commit_after>namespace :fact_graph do
  task :recalculate => :environment do
    
    `echo "#{Process.pid}" > /var/lock/monit/fact_graph/fact_graph_recalculate.pid`
    `echo "#{Process.ppid}" > /var/lock/monit/fact_graph/fact_graph_recalculate.ppid`
    
    
    STDOUT.flush
    sleep_time = 10
    puts "now recalculating with interval of #{sleep_time} seconds"  
    while true
      #print "(#{Time.now.asctime}) recalculating FactGraph\n"
      FactGraph.recalculate
      #print "(#{Time.now.asctime}) sleeping\n"
{'fraction_non_alphanumeric': 0.12465878070973613, 'fraction_numerical': 0.00545950864422202, 'mean_word_length': 3.4534412955465585, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '495515', 'n_tokens_mistral': 391, 'n_tokens_neox': 376, 'n_words': 72}