2020-08-07 14:09:53 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class PagesUpdateConfigurationWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
|
|
|
|
idempotent!
|
|
|
|
feature_category :pages
|
|
|
|
|
2021-02-23 13:10:40 -05:00
|
|
|
def self.perform_async(*args)
|
|
|
|
return unless Feature.enabled?(:pages_update_legacy_storage, default_enabled: true)
|
|
|
|
|
|
|
|
super(*args)
|
|
|
|
end
|
|
|
|
|
2020-08-07 14:09:53 -04:00
|
|
|
def perform(project_id)
|
|
|
|
project = Project.find_by_id(project_id)
|
|
|
|
return unless project
|
|
|
|
|
2020-08-25 08:04:30 -04:00
|
|
|
Projects::UpdatePagesConfigurationService.new(project).execute
|
2020-08-07 14:09:53 -04:00
|
|
|
end
|
|
|
|
end
|