Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/dependency_proxy.rb')
-rw-r--r--lib/api/dependency_proxy.rb12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/api/dependency_proxy.rb b/lib/api/dependency_proxy.rb
index 185b8d5a15d..9d0b1bf4423 100644
--- a/lib/api/dependency_proxy.rb
+++ b/lib/api/dependency_proxy.rb
@@ -6,15 +6,6 @@ module API
feature_category :dependency_proxy
- helpers do
- def obtain_new_purge_cache_lease
- Gitlab::ExclusiveLease
- .new("dependency_proxy:delete_group_blobs:#{user_group.id}",
- timeout: 1.hour)
- .try_obtain
- end
- end
-
after_validation do
authorize! :admin_group, user_group
end
@@ -29,9 +20,6 @@ module API
delete ':id/dependency_proxy/cache' do
not_found! unless user_group.dependency_proxy_feature_available?
- message = 'This request has already been made. It may take some time to purge the cache. You can run this at most once an hour for a given group'
- render_api_error!(message, 409) unless obtain_new_purge_cache_lease
-
# rubocop:disable CodeReuse/Worker
PurgeDependencyProxyCacheWorker.perform_async(current_user.id, user_group.id)
# rubocop:enable CodeReuse/Worker