<commit_before># -- encoding : utf-8 --
require 'time'
require 'pp'
require 'thread'

module PointyHair
  class Manager < Worker
    attr_accessor :worker_config, :poll_interval, :keep_files, :verbose

    def initialize
      super
      @base_dir = '/tmp/pointy-hair'
      @workers = [ ]
      @kind = "manager"
      @instance = 0
      @poll_interval = 5
      @keep_files = (ENV['POINTY_HAIR_KEEP_FILES'] || '0').to_i > 0
    end

    def reload_config!
    end

    def workers; @workers; end

    def setup_process!
      current_symlink!
      setup_signal_handlers!
    end

    def before_run!
      start_reaper!
    end

    def get_work!
      true
    end

    def work! work
      reload_config!<commit_msg>Set @keep_files false if <= 0.<commit_after># -- encoding : utf-8 --
require 'time'
require 'pp'
require 'thread'

module PointyHair
  class Manager < Worker
    attr_accessor :worker_config, :poll_interval, :keep_files, :verbose

    def initialize
      super
      @base_dir = '/tmp/pointy-hair'
      @workers = [ ]
      @kind = "manager"
      @instance = 0
      @poll_interval = 5
      @keep_files = (ENV['POINTY_HAIR_KEEP_FILES'] || '0').to_i
      @keep_files = false unless @keep_files > 0
    end

    def reload_config!
    end

    def workers; @workers; end

    def setup_process!
      current_symlink!
      setup_signal_handlers!
    end

    def before_run!
      start_reaper!
    end

    def get_work!
      true
    end

    def work! work
      reload_config!
{'fraction_non_alphanumeric': 0.09615384615384616, 'fraction_numerical': 0.007294429708222812, 'mean_word_length': 2.3533333333333335, 'pattern_counts': {'":': 0, '<': 6, '<?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': '2070200', 'n_tokens_mistral': 531, 'n_tokens_neox': 503, 'n_words': 127}