Async destruction of billable members
What does this MR do and why?
Adds support for removing billable members via an async job.
This will hopefully improve performance for larger hierarchies, as discussed in #467281 (closed).
In that issue it was noted that the BillableMembers::DestroyService was not timing out, but the underlying Members::DestroyService was. This will hopefully reduce issues by calling the Members::DestroyService in an async worker instead.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Setup a group with multiple users added
- Remove one of the users via the API:
curl --request DELETE \ --url 'http://gdk.test:3000/api/v4/groups/group-id-here/billable_members/user-id-here' \ --header 'PRIVATE-TOKEN: your-token-here' - Verify the user was removed via the usage quotas or member management screens (Groups -> Your Group -> Manage -> Members)
- Do the same again, but this time using the new async option:
curl --request DELETE \ --url 'http://gdk.test:3000/api/v4/groups/group-id-here/billable_members/another-user-id-here?async=true' \ --header 'PRIVATE-TOKEN: your-token-here'
Edited by Vijay Hawoldar