diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-06-29 01:11:45 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-06-29 01:11:45 +0000 |
commit | c89f7c71f69e575bb2e45746917decbbf9118203 (patch) | |
tree | 306f192360a6cde07bdc6795beeaa5f1f7e8c171 /app/services | |
parent | b07c00032b038f40796a28e34b6dd4c622bad012 (diff) | |
parent | 1fbb7f977777de7c8808429693359c7a98ffdfcc (diff) | |
download | gitlab-ce-c89f7c71f69e575bb2e45746917decbbf9118203.tar.gz |
Merge branch '30708-stop-using-deleted-at-to-filter-namespaces' into 'master'
refactors Project#search namespace join
Closes #30708
See merge request !12091
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/ci/register_job_service.rb | 4 | ||||
-rw-r--r-- | app/services/groups/destroy_service.rb | 2 | ||||
-rw-r--r-- | app/services/users/destroy_service.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/services/ci/register_job_service.rb b/app/services/ci/register_job_service.rb index af84d4c7427..b951e8d0c9f 100644 --- a/app/services/ci/register_job_service.rb +++ b/app/services/ci/register_job_service.rb @@ -54,7 +54,7 @@ module Ci def builds_for_shared_runner new_builds. # don't run projects which have not enabled shared runners and builds - joins(:project).where(projects: { shared_runners_enabled: true }) + joins(:project).where(projects: { shared_runners_enabled: true, pending_delete: false }) .joins('LEFT JOIN project_features ON ci_builds.project_id = project_features.project_id') .where('project_features.builds_access_level IS NULL or project_features.builds_access_level > 0'). @@ -66,7 +66,7 @@ module Ci end def builds_for_specific_runner - new_builds.where(project: runner.projects.with_builds_enabled).order('created_at ASC') + new_builds.where(project: runner.projects.without_deleted.with_builds_enabled).order('created_at ASC') end def running_builds_for_shared_runners diff --git a/app/services/groups/destroy_service.rb b/app/services/groups/destroy_service.rb index 497fdb09cdc..d40d280140a 100644 --- a/app/services/groups/destroy_service.rb +++ b/app/services/groups/destroy_service.rb @@ -10,7 +10,7 @@ module Groups def execute group.prepare_for_destroy - group.projects.with_deleted.each do |project| + group.projects.each do |project| # Execute the destruction of the models immediately to ensure atomic cleanup. # Skip repository removal because we remove directory with namespace # that contain all these repositories diff --git a/app/services/users/destroy_service.rb b/app/services/users/destroy_service.rb index 673afb8b5b9..9d7237c2fbb 100644 --- a/app/services/users/destroy_service.rb +++ b/app/services/users/destroy_service.rb @@ -35,7 +35,7 @@ module Users Groups::DestroyService.new(group, current_user).execute end - user.personal_projects.with_deleted.each do |project| + user.personal_projects.each do |project| # Skip repository removal because we remove directory with namespace # that contain all this repositories ::Projects::DestroyService.new(project, current_user, skip_repo: true).execute |