Read about our upcoming Code of Conduct on this issue

update_pages_service.rb 304 Bytes
Newer Older
Kamil Trzcinski's avatar
Kamil Trzcinski committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class UpdatePagesService
  attr_reader :data

  def initialize(data)
    @data = data
  end

  def execute
    return unless Settings.pages.enabled
    return unless data[:build_name] == 'pages'
    return unless data[:build_status] == 'success'

    PagesWorker.perform_async(data[:build_id])
  end
end