Class: SidekiqUniqueJobs::OnConflict::Log

Inherits:
Strategy
  • Object
show all
Includes:
Logging
Defined in:
lib/sidekiq_unique_jobs/on_conflict/log.rb

Overview

Strategy to log information about conflict

Author:

Instance Attribute Summary

Attributes inherited from Strategy

#item

Instance Method Summary collapse

Methods included from Logging

#log_debug, #log_error, #log_fatal, #log_info, #log_warn, #logger, #logging_context

Methods inherited from Strategy

#initialize, #replace?

Constructor Details

This class inherits a constructor from SidekiqUniqueJobs::OnConflict::Strategy

Instance Method Details

#callObject

Logs an informational message about that the job was not unique



12
13
14
15
16
17
# File 'lib/sidekiq_unique_jobs/on_conflict/log.rb', line 12

def call
  log_info(
    "skipping job with id (#{item[JID_KEY]}) " \
    "because unique_digest: (#{item[UNIQUE_DIGEST_KEY]}) already exists",
  )
end