2018-06-27 07:23:28 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-02-19 18:09:10 +00:00
|
|
|
class PagesWorker # rubocop:disable Scalability/IdempotentWorker
|
2017-11-28 16:08:30 +00:00
|
|
|
include ApplicationWorker
|
2015-11-03 20:28:07 +00:00
|
|
|
|
2021-07-21 12:09:35 +00:00
|
|
|
data_consistency :always
|
|
|
|
|
2018-03-05 12:57:48 +00:00
|
|
|
sidekiq_options retry: 3
|
2019-10-18 11:11:44 +00:00
|
|
|
feature_category :pages
|
2020-06-12 12:08:56 +00:00
|
|
|
loggable_arguments 0, 1
|
2021-07-28 03:08:41 +00:00
|
|
|
worker_resource_boundary :cpu
|
2015-11-03 20:28:07 +00:00
|
|
|
|
2015-12-18 12:07:53 +00:00
|
|
|
def perform(action, *arg)
|
2017-08-04 02:20:34 +00:00
|
|
|
send(action, *arg) # rubocop:disable GitlabSecurity/PublicSend
|
2015-12-18 12:07:53 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def deploy(build_id)
|
2021-11-10 15:13:21 +00:00
|
|
|
build = Ci::Build.find_by_id(build_id)
|
2015-11-03 20:28:07 +00:00
|
|
|
|
2021-12-23 18:14:10 +00:00
|
|
|
Projects::UpdatePagesService.new(build.project, build).execute
|
2015-12-18 12:07:53 +00:00
|
|
|
end
|
2015-11-03 20:28:07 +00:00
|
|
|
end
|