debian-mirror-gitlab/app/workers/reactive_caching_worker.rb
2019-05-18 00:54:41 +05:30

19 lines
370 B
Ruby

# frozen_string_literal: true
class ReactiveCachingWorker
include ApplicationWorker
def perform(class_name, id, *args)
klass = begin
class_name.constantize
rescue NameError
nil
end
return unless klass
klass
.reactive_cache_worker_finder
.call(id, *args)
.try(:exclusively_update_reactive_cache!, *args)
end
end