mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-20 14:11:11 +00:00
16 lines
425 B
Ruby
16 lines
425 B
Ruby
# frozen_string_literal: true
|
|
|
|
class UploadChecksumWorker # rubocop:disable Scalability/IdempotentWorker
|
|
include ApplicationWorker
|
|
|
|
feature_category :geo_replication
|
|
|
|
def perform(upload_id)
|
|
upload = Upload.find(upload_id)
|
|
upload.calculate_checksum!
|
|
upload.save!
|
|
rescue ActiveRecord::RecordNotFound
|
|
Gitlab::AppLogger.error("UploadChecksumWorker: couldn't find upload #{upload_id}, skipping")
|
|
end
|
|
end
|