2018-06-27 07:23:28 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-02-19 18:09:10 +00:00
|
|
|
class CreateNoteDiffFileWorker # rubocop:disable Scalability/IdempotentWorker
|
2018-05-16 15:46:18 +00:00
|
|
|
include ApplicationWorker
|
|
|
|
|
2021-07-21 12:09:35 +00:00
|
|
|
data_consistency :always
|
|
|
|
|
2021-04-30 18:10:09 +00:00
|
|
|
sidekiq_options retry: 3
|
|
|
|
|
2020-12-02 18:09:35 +00:00
|
|
|
feature_category :code_review
|
2019-10-18 11:11:44 +00:00
|
|
|
|
2018-05-16 15:46:18 +00:00
|
|
|
def perform(diff_note_id)
|
2021-10-13 18:12:40 +00:00
|
|
|
return unless diff_note_id.present?
|
|
|
|
|
2021-10-13 15:12:51 +00:00
|
|
|
diff_note = DiffNote.find_by_id(diff_note_id) # rubocop: disable CodeReuse/ActiveRecord
|
2018-05-16 15:46:18 +00:00
|
|
|
|
2021-10-13 15:12:51 +00:00
|
|
|
diff_note&.create_diff_file
|
2018-05-16 15:46:18 +00:00
|
|
|
end
|
|
|
|
end
|