module SidekiqUniqueJobs::OnConflict
Provides lock conflict resolutions
@author Mikael Henriksson <mikael@mhenrixon.com>
Public Class Methods
Source
# File lib/sidekiq_unique_jobs/on_conflict.rb, line 31 def self.find_strategy(strategy) return OnConflict::NullStrategy unless strategy strategies.fetch(strategy.to_sym) do SidekiqUniqueJobs.logger.warn( "No matching implementation for strategy: #{strategy}, returning OnConflict::NullStrategy. " \ "Available strategies are (#{strategies.inspect})", ) OnConflict::NullStrategy end end
Find a strategy to use for conflicting locks
@param [Symbol] strategy the key for the strategy
@return [OnConflict::Strategy] when found @return [OnConflict::NullStrategy] when no other could be found
Source
# File lib/sidekiq_unique_jobs/on_conflict.rb, line 19 def self.strategies SidekiqUniqueJobs.strategies end
A convenience method for using the configured strategies