summaryrefslogtreecommitdiff
path: root/app/workers/deployments/finished_worker.rb
blob: 6196b032f63055837ce39fbd5e67f393c2c7d5b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

module Deployments
  class FinishedWorker
    include ApplicationWorker

    queue_namespace :deployment
    feature_category :continuous_delivery
    worker_resource_boundary :cpu

    def perform(deployment_id)
      if (deploy = Deployment.find_by_id(deployment_id))
        LinkMergeRequestsService.new(deploy).execute
        deploy.execute_hooks
      end
    end
  end
end