gitlab-org--gitlab-foss/app/workers/pages_worker.rb

20 lines
464 B
Ruby
Raw Normal View History

class PagesWorker
include Sidekiq::Worker
sidekiq_options queue: :pages, retry: false
2015-12-18 12:07:53 +00:00
def perform(action, *arg)
send(action, *arg)
end
def deploy(build_id)
build = Ci::Build.find_by(id: build_id)
Projects::UpdatePagesService.new(build.project, build).execute
2015-12-16 15:29:53 +00:00
end
2015-12-18 12:07:53 +00:00
def remove(namespace_path, project_path)
full_path = File.join(Settings.pages.path, namespace_path, project_path)
FileUtils.rm_r(full_path, force: true)
end
end