<commit_before>require 'sucker_punch'

module ActiveJob
  module QueueAdapters
    class SuckerPunchAdapter
      class << self
        def queue(job, *args)
          JobWrapper.new.async.perform(job, *args)
        end

        def queue_at(job, timestamp, *args)
          JobWrapper.new.async.later(timestamp, job, *args)
        end
      end

      class JobWrapper
        include SuckerPunch::Job

        def perform(job, *args)
          job.new.perform *Parameters.deserialize(args)
        end

        def later(sec, job_name, *args)
          delay = Time.now.to_f - sec
          after(delay > 0 ? delay : 0) { perform(job_name, *args) }
        end
      end
    end
  end
end<commit_msg>Switch to NIE<commit_after>require 'sucker_punch'

module ActiveJob
  module QueueAdapters
    class SuckerPunchAdapter
      class << self
        def queue(job, *args)
          JobWrapper.new.async.perform(job, *args)
        end

        def queue_at(job, timestamp, *args)
          raise NotImplementedError
        end
      end

      class JobWrapper
        include SuckerPunch::Job

        def perform(job, *args)
          job.new.perform *Parameters.deserialize(args)
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08, 'fraction_numerical': 0.0016326530612244899, 'mean_word_length': 2.0049019607843137, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 4, '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': '6267093', 'n_tokens_mistral': 378, 'n_tokens_neox': 367, 'n_words': 92}