debian-mirror-gitlab/app/models/concerns/reactive_service.rb

14 lines
348 B
Ruby
Raw Normal View History

2018-11-20 20:47:30 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
module ReactiveService
extend ActiveSupport::Concern
included do
include ReactiveCaching
# Default cache key: class name + project_id
self.reactive_cache_key = ->(service) { [service.class.model_name.singular, service.project_id] }
2021-01-03 14:25:43 +05:30
self.reactive_cache_work_type = :external_dependency
2017-08-17 22:00:37 +05:30
end
end