debian-mirror-gitlab/app/workers/upload_checksum_worker.rb
2018-03-17 18:26:18 +05:30

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