Sha256: 88425df1fdd5d5a7da3b6215ffe7ff1c8760dcb0b81dd38a9952073908cb6fb7

Contents?: true

Size: 595 Bytes

Versions: 8

Compression:

Stored size: 595 Bytes

Contents

# frozen_string_literal: true

module SidekiqUniqueJobs
  module OnConflict
    # Strategy to log information about conflict
    #
    # @author Mikael Henriksson <mikael@zoolutions.se>
    class Log < OnConflict::Strategy
      include SidekiqUniqueJobs::Logging

      #
      # Logs an informational message about that the job was not unique
      #
      #
      # @return [void]
      #
      def call
        log_info(<<~MESSAGE.chomp)
          Skipping job with id (#{item[JID]}) because unique_digest: (#{item[UNIQUE_DIGEST]}) already exists
        MESSAGE
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-7.0.0.beta9 lib/sidekiq_unique_jobs/on_conflict/log.rb
sidekiq-unique-jobs-7.0.0.beta8 lib/sidekiq_unique_jobs/on_conflict/log.rb
sidekiq-unique-jobs-7.0.0.beta7 lib/sidekiq_unique_jobs/on_conflict/log.rb
sidekiq-unique-jobs-7.0.0.beta6 lib/sidekiq_unique_jobs/on_conflict/log.rb
sidekiq-unique-jobs-7.0.0.beta5 lib/sidekiq_unique_jobs/on_conflict/log.rb
sidekiq-unique-jobs-7.0.0.beta4 lib/sidekiq_unique_jobs/on_conflict/log.rb
sidekiq-unique-jobs-7.0.0.beta3 lib/sidekiq_unique_jobs/on_conflict/log.rb
sidekiq-unique-jobs-7.0.0.beta2 lib/sidekiq_unique_jobs/on_conflict/log.rb