summaryrefslogtreecommitdiff
path: root/app/services/members
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2019-08-07 15:53:57 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2019-08-08 13:33:50 +0200
commitdc6b8adba96bd3bb1b8ebf561aaf261f1cb209a1 (patch)
treebac757371c13952c8637fbf4d77a938d890ebcb6 /app/services/members
parent8505049e1f2510642715d9bfd56fc022cd42caf0 (diff)
downloadgitlab-ce-dc6b8adba96bd3bb1b8ebf561aaf261f1cb209a1.tar.gz
Backport EE changes to Members::BaseServiceapp-differences
EE made some small changes to this class, but these changes were not backported to CE.
Diffstat (limited to 'app/services/members')
-rw-r--r--app/services/members/base_service.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/members/base_service.rb b/app/services/members/base_service.rb
index e78affff797..5d69418fb7d 100644
--- a/app/services/members/base_service.rb
+++ b/app/services/members/base_service.rb
@@ -51,7 +51,9 @@ module Members
def enqueue_delete_todos(member)
type = member.is_a?(GroupMember) ? 'Group' : 'Project'
# don't enqueue immediately to prevent todos removal in case of a mistake
- TodosDestroyer::EntityLeaveWorker.perform_in(Todo::WAIT_FOR_DELETE, member.user_id, member.source_id, type)
+ member.run_after_commit_or_now do
+ TodosDestroyer::EntityLeaveWorker.perform_in(Todo::WAIT_FOR_DELETE, member.user_id, member.source_id, type)
+ end
end
end
end