module SidekiqUniqueJobs::Reflectable

Module Reflectable provides a method to notify subscribers

@author Mikael Henriksson <mikael@mhenrixon.com>

Public Instance Methods

reflect(reflection, *args) click to toggle source

Reflects on specific event

@param [Symbol] reflection the reflected event @param [Array] args arguments to provide to reflector

@return [void]

# File lib/sidekiq_unique_jobs/reflectable.rb, line 18
def reflect(reflection, *args)
  SidekiqUniqueJobs.reflections.dispatch(reflection, *args)
  nil
rescue UniqueJobsError => ex
  SidekiqUniqueJobs.logger.error(ex)
  nil
end