gitlab-org--gitlab-foss/app/workers/upload_checksum_worker.rb
Kamil Trzciński 8af23def1d Revert "Merge branch '3867-port-to-ce' into 'master'"
This reverts commit 54a575f1bb, reversing
changes made to c63af942e5.
2018-02-28 21:09:34 +01:00

11 lines
305 B
Ruby

class UploadChecksumWorker
include ApplicationWorker
def perform(upload_id)
upload = Upload.find(upload_id)
upload.calculate_checksum!
upload.save!
rescue ActiveRecord::RecordNotFound
Rails.logger.error("UploadChecksumWorker: couldn't find upload #{upload_id}, skipping")
end
end