gitlab-org--gitlab-foss/app/workers/upload_checksum_worker.rb
2017-03-06 14:41:09 -05:00

12 lines
334 B
Ruby

class UploadChecksumWorker
include Sidekiq::Worker
include DedicatedSidekiqQueue
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