debian-mirror-gitlab/app/workers/pages_update_configuration_worker.rb

25 lines
485 B
Ruby
Raw Normal View History

2020-10-24 23:57:45 +05:30
# frozen_string_literal: true
class PagesUpdateConfigurationWorker
include ApplicationWorker
2021-06-08 01:23:25 +05:30
sidekiq_options retry: 3
2020-10-24 23:57:45 +05:30
idempotent!
feature_category :pages
2021-06-08 01:23:25 +05:30
tags :exclude_from_kubernetes
2020-10-24 23:57:45 +05:30
2021-04-17 20:07:23 +05:30
def self.perform_async(*args)
2021-04-29 21:17:54 +05:30
return unless ::Settings.pages.local_store.enabled
2021-04-17 20:07:23 +05:30
super(*args)
end
2020-10-24 23:57:45 +05:30
def perform(project_id)
project = Project.find_by_id(project_id)
return unless project
2020-11-24 15:15:51 +05:30
Projects::UpdatePagesConfigurationService.new(project).execute
2020-10-24 23:57:45 +05:30
end
end