2018-06-27 03:23:28 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-12-16 23:09:50 -05:00
|
|
|
class ReactiveCachingWorker
|
2017-11-28 11:08:30 -05:00
|
|
|
include ApplicationWorker
|
2016-12-16 23:09:50 -05:00
|
|
|
|
2019-10-18 07:11:44 -04:00
|
|
|
feature_category_not_owned!
|
|
|
|
|
2017-01-12 17:31:02 -05:00
|
|
|
def perform(class_name, id, *args)
|
2016-12-16 23:09:50 -05:00
|
|
|
klass = begin
|
2019-02-14 13:05:35 -05:00
|
|
|
class_name.constantize
|
2016-12-16 23:09:50 -05:00
|
|
|
rescue NameError
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
return unless klass
|
|
|
|
|
2019-04-04 13:27:29 -04:00
|
|
|
klass
|
|
|
|
.reactive_cache_worker_finder
|
|
|
|
.call(id, *args)
|
|
|
|
.try(:exclusively_update_reactive_cache!, *args)
|
2016-12-16 23:09:50 -05:00
|
|
|
end
|
|
|
|
end
|