<commit_before>require 'rufus-scheduler'
require 'yaml'
require 'honduras'

namespace :resque do
  task :scheduler, :schedule_file do |_, args|
    puts "Loading resque schedule from #{args.schedule_file}"
    schedule = YAML.load_file(args.schedule_file)
    scheduler = Rufus::Scheduler.start_new

    Honduras::ResqueSchedule.start(scheduler, schedule)

    scheduler.every('5s') do
      print '.'
      Resque.enqueue_delayed_tasks
    end

    sleep
  end
end<commit_msg>Joining scheduler instead of sleeping<commit_after>require 'rufus-scheduler'
require 'yaml'
require 'honduras'

namespace :resque do
  task :scheduler, :schedule_file do |_, args|
    puts "Loading resque schedule from #{args.schedule_file}"
    schedule = YAML.load_file(args.schedule_file)
    scheduler = Rufus::Scheduler.start_new

    Honduras::ResqueSchedule.start(scheduler, schedule)

    scheduler.every('5s') do
      print '.'
      Resque.enqueue_delayed_tasks
    end

    scheduler.join
  end
end
{'fraction_non_alphanumeric': 0.09625126646403243, 'fraction_numerical': 0.002026342451874367, 'mean_word_length': 4.092783505154639, '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': '6844637', 'n_tokens_mistral': 330, 'n_tokens_neox': 323, 'n_words': 71}