debian-mirror-gitlab/app/workers/pages_remove_worker.rb
2020-11-24 15:15:51 +05:30

17 lines
378 B
Ruby

# frozen_string_literal: true
class PagesRemoveWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
feature_category :pages
loggable_arguments 0
def perform(project_id)
project = Project.find_by_id(project_id)
return unless project
project.remove_pages
project.pages_domains.delete_all
end
end