Skip to content
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

Improve support for bulk deletes (when reprocessing lots of companies) #806

Open
ianco opened this issue Jan 22, 2025 · 0 comments
Open
Assignees

Comments

@ianco
Copy link
Contributor

ianco commented Jan 22, 2025

Currently there are two methods of deleting companies from OrgBook (in order to reprocess the data from BC Registries):

  1. Deleting individual companies using the "manage" command (executed via the orgbook-configurations project)
  2. Manually deleting the company information from the OrgBook database, where there are a significant number of companies to reprocess

There are some drawbacks to the second approach:

  • the OrgBook search indexes are not updated, so these must be re-run once the data updates are completed (this can take several days for a full re-index)
  • the credentials are not deleted from the OrgBook wallet

It would be preferable if the first approach supported bulk deletes. This would be a fairy straightforward update:

  • allow multiple company numbers to be input, comma-delimited (e.g. manage.py delete_topic BC123456,FM123456,A123456)
  • convert the input topic(s) to a list, and iterate through the list
  • delete each topic

It's not possible to "group" the companies within the script, since the wallet credentials must be deleted individually, and the Django framework is used to perform the actual delete.

The execution time may be too much if there are a lot of companies being deleted - the processing time has been added to the script in PR #805, so this can be measured/estimated in the future.

It is expected that there will be 3 methods required to delete OrgBook companies:

  1. Deleting individual companies using the "manage" command (executed via the orgbook-configurations project)
  2. Deleting some intermediate number of companies using the "manage" command (max number to be determined based on timings)
  3. Manually deleting the company information from the OrgBook database, where there are a significant number of companies to reprocess (more than the manage script can handle in a reasonable time)
@esune esune moved this to Assignment Ready in CDT Enterprise Apps Jan 24, 2025
@esune esune moved this from Assignment Ready to Assigned in CDT Enterprise Apps Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Assigned
Development

No branches or pull requests

2 participants