<commit_before>require 'sidekiq'
require 'sidekiq/util'
require 'rekiq/configuration'
require 'rekiq/job'
require 'rekiq/scheduler'

module Rekiq
  module Middleware
    class WorkOverseer
      include ::Sidekiq::Util

      attr_accessor :worker_name, :queue, :args, :job, :addon,
                    :scheduled_work_time

      def call(worker, msg, queue)
        return yield unless msg['rq:job'] and msg['retry_count'].nil?

        self.worker_name = worker.class.name
        self.queue       = queue
        self.args        = msg['args']
        self.job         = Job.from_array(msg['rq:job'])
        self.addon       = msg['rq:addon']
        self.scheduled_work_time = Time.at(msg['rq:at'].to_f)
        schedule_post_work       = job.schedule_post_work?

        if schedule_post_work
          begin
            yield
          ensure
            reschedule
          end
        else
          reschedule
          yield
        end
      end<commit_msg>removing variable<commit_after>require 'sidekiq'
require 'sidekiq/util'
require 'rekiq/configuration'
require 'rekiq/job'
require 'rekiq/scheduler'

module Rekiq
  module Middleware
    class WorkOverseer
      include ::Sidekiq::Util

      attr_accessor :worker_name, :queue, :args, :job, :addon,
                    :scheduled_work_time

      def call(worker, msg, queue)
        return yield unless msg['rq:job'] and msg['retry_count'].nil?

        self.worker_name = worker.class.name
        self.queue       = queue
        self.args        = msg['args']
        self.job         = Job.from_array(msg['rq:job'])
        self.addon       = msg['rq:addon']
        self.scheduled_work_time = Time.at(msg['rq:at'].to_f)

        if job.schedule_post_work?
          begin
            yield
          ensure
            reschedule
          end
        else
          reschedule
          yield
        end
      end
{'fraction_non_alphanumeric': 0.09460887949260043, 'fraction_numerical': 0.0, 'mean_word_length': 1.898928024502297, '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': '3503150', 'n_tokens_mistral': 583, 'n_tokens_neox': 574, 'n_words': 120}