<commit_before>class LoopDance::Task
  attr_accessor :last_run_at, :block, :interval
  
  def initialize( interval, &block )
    run_count=0
    self.interval = interval
    self.block = block
    self.last_run_at = Time.now
  end
  
  def time_to_run?
    !last_run_at || last_run_at + interval <= Time.now
  end
  
  def run
    block.call
  rescue Exception => e
    puts "Uncaught exception bubbled up: \n#{e.class}: #{e.message}\n\t#{e.backtrace.join("\n\t")} "
  ensure
    self.last_run_at = Time.now
  end
  
end
<commit_msg>No timeout for first task's run when dancer is starting<commit_after>class LoopDance::Task
  attr_accessor :last_run_at, :block, :interval
  
  def initialize( interval, &block )
    run_count=0
    self.interval = interval
    self.block = block
    
    # Run tasks when start dancer
    # self.last_run_at = Time.now
  end
  
  def time_to_run?
    !last_run_at || last_run_at + interval <= Time.now
  end
  
  def run
    block.call
  rescue Exception => e
    puts "Uncaught exception bubbled up: \n#{e.class}: #{e.message}\n\t#{e.backtrace.join("\n\t")} "
  ensure
    self.last_run_at = Time.now
  end
  
end

{'fraction_non_alphanumeric': 0.11053089643167972, 'fraction_numerical': 0.0017406440382941688, 'mean_word_length': 2.9655172413793105, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5487188', 'n_tokens_mistral': 421, 'n_tokens_neox': 423, 'n_words': 100}