diff options
Diffstat (limited to 'app/services/members')
-rw-r--r-- | app/services/members/destroy_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/members/destroy_service.rb b/app/services/members/destroy_service.rb index f18269454e3..5afc13701e0 100644 --- a/app/services/members/destroy_service.rb +++ b/app/services/members/destroy_service.rb @@ -15,15 +15,15 @@ module Members @skip_auth = skip_authorization last_owner = true - in_lock("delete_members:#{member.source.class}:#{member.source.id}") do + in_lock("delete_members:#{member.source.class}:#{member.source.id}", sleep_sec: 0.1.seconds) do break if member.is_a?(GroupMember) && member.source.last_owner?(member.user) last_owner = false member.destroy - member.user&.invalidate_cache_counts end unless last_owner + member.user&.invalidate_cache_counts delete_member_associations(member, skip_subresources, unassign_issuables) end |