Merge branch 'app-differences' into 'master'

Backport EE changes to Members::BaseService

See merge request gitlab-org/gitlab-ce!31581
This commit is contained in:
Rémy Coutable 2019-08-09 14:35:54 +00:00
commit 2c894856c2

View file

@ -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