<commit_before>require 'resque_spec'

module ResqueSpec

  def scheduled?(klass, time, *args)
    schedule_for(klass).any? {|entry| entry[:klass].to_s == klass.to_s && entry[:time] == time && entry[:args] == args}
  end

  def scheduled_anytime?(klass, *args)
    schedule_for(klass).any? {|entry| entry[:klass].to_s == klass.to_s && entry[:args] == args}
  end

  def schedule_for(klass)
    name = "#{queue_name(klass)}_scheduled"
    queues[name]
  end

  module ResqueScheduler
    def enqueue_at(time, klass, *args)
      ResqueSpec.schedule_for(klass) << {:klass => klass.to_s, :time  => time, :args => args}
    end
  end

end

Resque.extend(ResqueSpec::ResqueScheduler)

<commit_msg>Cleanup<commit_after>require 'resque_spec'

module ResqueSpec

  def scheduled?(klass, time, *args)
    schedule_for(klass).any? {|entry| entry[:klass].to_s == klass.to_s && entry[:time] == time && entry[:args] == args}
  end

  def scheduled_anytime?(klass, *args)
    schedule_for(klass).any? {|entry| entry[:klass].to_s == klass.to_s && entry[:args] == args}
  end

  def schedule_for(klass)
    name = "#{queue_name(klass)}_scheduled"
    queues[name]
  end

  module ResqueScheduler
    def enqueue_at(time, klass, *args)
      ResqueSpec.schedule_for(klass) << {:klass => klass.to_s, :time  => time, :args => args}
    end
  end

end

Resque.extend(ResqueSpec::ResqueScheduler)

{'fraction_non_alphanumeric': 0.1570909090909091, 'fraction_numerical': 0.0, 'mean_word_length': 4.417322834645669, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5203834', 'n_tokens_mistral': 503, 'n_tokens_neox': 522, 'n_words': 100}