<commit_before>require 'clockwork'

module EQ::Scheduling
  class Scheduler
    include Celluloid
    extend Clockwork

    handler do |job|
      EQ.push job if EQ.queue
    end

    def initialize config
      loop do
        Clockwork.tick
        sleep(Clockwork.config[:sleep_timeout])
        break unless Actor.current.alive?
      end
    end
  end
end
<commit_msg>fixed scheduler, overwriting celluloid #run is dangerous :D<commit_after>require 'clockwork'

module Clockwork
  handler do |job|
    EQ.push job if EQ.queue
  end
end

module EQ::Scheduling
  class Scheduler
    include EQ::Logging
    include Celluloid

    def initialize config
      clockwork!
    end

    def clockwork
      debug 'scheduler running'
      loop do
        Clockwork.tick
        sleep(Clockwork.config[:sleep_timeout])
        return unless Actor.current.alive?
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.05636978579481398, 'fraction_numerical': 0.0, 'mean_word_length': 2.4823529411764707, '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': '642552', 'n_tokens_mistral': 278, 'n_tokens_neox': 258, 'n_words': 81}