class SidekiqUniqueJobs::OnConflict::Strategy

@author Mikael Henriksson <mikael@mhenrixon.com>
@abstract
Abstract conflict strategy class

def call

Raises:
  • (NotImplementedError) - needs to be implemented in child class
def call
  raise NotImplementedError, "needs to be implemented in child class"
end

def initialize(item, redis_pool = nil)

Parameters:
  • redis_pool (ConnectionPool) -- the connection pool instance
  • item (Hash) -- sidekiq job hash
def initialize(item, redis_pool = nil)
  @item       = item
  @redis_pool = redis_pool
end

def replace?

Returns:
  • (false) - when the strategy is not a {Replace}
  • (true) - when the strategy is a {Replace}
def replace?
  is_a?(Replace)
end