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 'app/services/clusters/cleanup/app_service.rb')
-rw-r--r--app/services/clusters/cleanup/app_service.rb33
1 files changed, 0 insertions, 33 deletions
diff --git a/app/services/clusters/cleanup/app_service.rb b/app/services/clusters/cleanup/app_service.rb
deleted file mode 100644
index a7e29c78ea0..00000000000
--- a/app/services/clusters/cleanup/app_service.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-module Clusters
- module Cleanup
- class AppService < Clusters::Cleanup::BaseService
- def execute
- persisted_applications = @cluster.persisted_applications
-
- persisted_applications.each do |app|
- next unless app.available?
- next unless app.can_uninstall?
-
- log_event(:uninstalling_app, application: app.class.application_name)
- uninstall_app_async(app)
- end
-
- # Keep calling the worker untill all dependencies are uninstalled
- return schedule_next_execution(Clusters::Cleanup::AppWorker) if persisted_applications.any?
-
- log_event(:schedule_remove_project_namespaces)
- cluster.continue_cleanup!
- end
-
- private
-
- def uninstall_app_async(application)
- application.make_scheduled!
-
- Clusters::Applications::UninstallWorker.perform_async(application.name, application.id)
- end
- end
- end
-end