summaryrefslogtreecommitdiff
path: root/app/workers/pages_update_configuration_worker.rb
blob: ca5016dc782231e4f07c7d575d78377b4e3bc3f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

class PagesUpdateConfigurationWorker
  include ApplicationWorker

  idempotent!
  feature_category :pages

  def self.perform_async(*args)
    return unless ::Settings.pages.local_store.enabled

    super(*args)
  end

  def perform(project_id)
    project = Project.find_by_id(project_id)
    return unless project

    Projects::UpdatePagesConfigurationService.new(project).execute
  end
end