summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-02-15 17:15:54 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-02-27 13:09:55 +0200
commit3129dd502bb930302c27d465590b9582bea824d2 (patch)
treec3777ce4a7af9b14ef2e0601046617c33af93e1f
parent8b855eaf40fcb32d37c4cd2c2dbe8ff8be29c88c (diff)
downloadgitlab-ce-3129dd502bb930302c27d465590b9582bea824d2.tar.gz
Make nested groups deletion synchronous to avoid potential race
-rw-r--r--app/services/groups/destroy_service.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/groups/destroy_service.rb b/app/services/groups/destroy_service.rb
index 2e2d7f884ac..497fdb09cdc 100644
--- a/app/services/groups/destroy_service.rb
+++ b/app/services/groups/destroy_service.rb
@@ -18,7 +18,8 @@ module Groups
end
group.children.each do |group|
- DestroyService.new(group, current_user).async_execute
+ # This needs to be synchronous since the namespace gets destroyed below
+ DestroyService.new(group, current_user).execute
end
group.really_destroy!