2019-10-17 11:06:17 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-02-19 13:09:10 -05:00
|
|
|
class CreateEvidenceWorker # rubocop:disable Scalability/IdempotentWorker
|
2019-10-17 11:06:17 -04:00
|
|
|
include ApplicationWorker
|
|
|
|
|
2020-03-05 13:08:19 -05:00
|
|
|
feature_category :release_evidence
|
2020-01-24 13:09:00 -05:00
|
|
|
weight 2
|
2019-10-18 07:11:44 -04:00
|
|
|
|
2019-10-17 11:06:17 -04:00
|
|
|
def perform(release_id)
|
|
|
|
release = Release.find_by_id(release_id)
|
|
|
|
return unless release
|
|
|
|
|
|
|
|
Evidence.create!(release: release)
|
|
|
|
end
|
|
|
|
end
|