debian-mirror-gitlab/app/services/pages/delete_service.rb

16 lines
517 B
Ruby
Raw Normal View History

2020-01-01 13:55:28 +05:30
# frozen_string_literal: true
module Pages
class DeleteService < BaseService
def execute
2021-03-11 19:13:27 +05:30
project.mark_pages_as_not_deployed # prevents domain from updating config when deleted
project.pages_domains.delete_all
DestroyPagesDeploymentsWorker.perform_async(project.id)
# TODO: remove this call https://gitlab.com/gitlab-org/gitlab/-/issues/320775
PagesRemoveWorker.perform_async(project.id) if Feature.enabled?(:pages_update_legacy_storage, default_enabled: true)
2020-01-01 13:55:28 +05:30
end
end
end