2019-04-26 21:08:41 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Deployments
|
2020-02-19 18:09:10 +00:00
|
|
|
class FinishedWorker # rubocop:disable Scalability/IdempotentWorker
|
2019-04-26 21:08:41 +00:00
|
|
|
include ApplicationWorker
|
|
|
|
|
|
|
|
queue_namespace :deployment
|
2019-10-18 11:11:44 +00:00
|
|
|
feature_category :continuous_delivery
|
2019-10-30 15:14:17 +00:00
|
|
|
worker_resource_boundary :cpu
|
2019-04-26 21:08:41 +00:00
|
|
|
|
|
|
|
def perform(deployment_id)
|
2020-01-03 18:07:40 +00:00
|
|
|
if (deploy = Deployment.find_by_id(deployment_id))
|
2020-01-10 03:07:46 +00:00
|
|
|
LinkMergeRequestsService.new(deploy).execute
|
2020-01-03 18:07:40 +00:00
|
|
|
deploy.execute_hooks
|
|
|
|
end
|
|
|
|
end
|
2019-04-26 21:08:41 +00:00
|
|
|
end
|
|
|
|
end
|