Commit f8de15fb authored by Fabio Pitino's avatar Fabio Pitino

Merge branch '36720-remove-delay' into 'master'

Remove WAIT_FOR_DELETE delay

Closes #36720

See merge request gitlab-org/gitlab!36208
parents 5b193ac3 e9b82ea7
......@@ -2,8 +2,6 @@
module Members
class DestroyService < Members::BaseService
WAIT_FOR_DELETE = 1.hour
def execute(member, skip_authorization: false, skip_subresources: false, unassign_issuables: false)
raise Gitlab::Access::AccessDeniedError unless skip_authorization || can_destroy_member?(member)
......@@ -72,7 +70,7 @@ module Members
source_type = member.is_a?(GroupMember) ? 'Group' : 'Project'
member.run_after_commit do
MembersDestroyer::UnassignIssuablesWorker.perform_in(WAIT_FOR_DELETE, member.user_id, member.source_id, source_type)
MembersDestroyer::UnassignIssuablesWorker.perform_async(member.user_id, member.source_id, source_type)
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment