diff options
Diffstat (limited to 'app/services/dependency_proxy/find_or_create_blob_service.rb')
-rw-r--r-- | app/services/dependency_proxy/find_or_create_blob_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/dependency_proxy/find_or_create_blob_service.rb b/app/services/dependency_proxy/find_or_create_blob_service.rb index f3dbf31dcdb..0a6db6e3d34 100644 --- a/app/services/dependency_proxy/find_or_create_blob_service.rb +++ b/app/services/dependency_proxy/find_or_create_blob_service.rb @@ -12,7 +12,7 @@ module DependencyProxy def execute from_cache = true file_name = @blob_sha.sub('sha256:', '') + '.gz' - blob = @group.dependency_proxy_blobs.find_or_build(file_name) + blob = @group.dependency_proxy_blobs.active.find_or_build(file_name) unless blob.persisted? from_cache = false @@ -30,6 +30,8 @@ module DependencyProxy blob.save! end + # Technical debt: change to read_at https://gitlab.com/gitlab-org/gitlab/-/issues/341536 + blob.touch if from_cache success(blob: blob, from_cache: from_cache) end |