build_hooks_worker.rb 326 Bytes
Newer Older
1 2
# frozen_string_literal: true

3
class BuildHooksWorker
4
  include ApplicationWorker
5 6
  include PipelineQueue

7
  queue_namespace :pipeline_hooks
8

9
  # rubocop: disable CodeReuse/ActiveRecord
10 11 12 13
  def perform(build_id)
    Ci::Build.find_by(id: build_id)
      .try(:execute_hooks)
  end
14
  # rubocop: enable CodeReuse/ActiveRecord
15
end