Module: CanvasSync::JobUniqueness::Compat

Defined in:
lib/canvas_sync/job_uniqueness/compat.rb,
lib/canvas_sync/job_uniqueness/compat/sidekiq.rb,
lib/canvas_sync/job_uniqueness/compat/active_job.rb

Defined Under Namespace

Modules: ActiveJob, Sidekiq

Class Method Summary collapse

Class Method Details

.load_compat(name) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/canvas_sync/job_uniqueness/compat.rb', line 4

def self.load_compat(name)
  name = name.to_s
  begin
    require name
  rescue LoadError
  end

  if name.classify.safe_constantize
    require_relative "./compat/#{name}"
    "#{self.name}::#{name.classify}".constantize.configure
  end
end