-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix organization deletion #4851
Conversation
…etion so as to not try to remove org before the org is empty
this is all so much cleaner. Can you explain where the bug was? |
I can try. This is based on a lot of experimentation and reading of the celery docs - and I may well be misunderstanding them. In short, I think the chain() method, while techincally working correctly, is not aware of the underlying tasks generated in the task it fires off - So I effectively single-threaded it. This will mean that orgs with boatloads of properties/taxlots will take longer to delete - but I'm not entirely sure how core of a use-case that is. This is doing deletes in chunks of 100. We could certainly increase the chunk size there - postgres is fast and could handle a bigger set of IDs without any issue. |
What's this PR do?
Reworks the organization deletion job in celery to ensure the property/taxlot deletions happen before the organization deletion is attempted.
Adds a modal confirmation for organization deletion, migrates the inventory progress bar to that modal.
How should this be manually tested?
Create an org, load some inventory, then delete the organization.
What are the relevant tickets?
#4814 #4836
Screenshots (if appropriate)