2019-04-26 17:08:41 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-10-15 11:08:45 -04:00
|
|
|
# This worker is deprecated and will be removed in 14.0
|
|
|
|
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/266381
|
2019-04-26 17:08:41 -04:00
|
|
|
module Deployments
|
2020-02-19 13:09:10 -05:00
|
|
|
class FinishedWorker # rubocop:disable Scalability/IdempotentWorker
|
2019-04-26 17:08:41 -04:00
|
|
|
include ApplicationWorker
|
|
|
|
|
|
|
|
queue_namespace :deployment
|
2019-10-18 07:11:44 -04:00
|
|
|
feature_category :continuous_delivery
|
2019-10-30 11:14:17 -04:00
|
|
|
worker_resource_boundary :cpu
|
2019-04-26 17:08:41 -04:00
|
|
|
|
|
|
|
def perform(deployment_id)
|
2020-01-03 13:07:40 -05:00
|
|
|
if (deploy = Deployment.find_by_id(deployment_id))
|
2020-01-09 22:07:46 -05:00
|
|
|
LinkMergeRequestsService.new(deploy).execute
|
2020-01-03 13:07:40 -05:00
|
|
|
deploy.execute_hooks
|
|
|
|
end
|
|
|
|
end
|
2019-04-26 17:08:41 -04:00
|
|
|
end
|
|
|
|
end
|