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

Commands: fix remap_user_ids and add map_cantus_ids #1662

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

dchiller
Copy link
Contributor

"Fixes" remap_user_ids command by:

  • reducing the number of sources and chants through which the command iterates by filtering all sources and chants to only those created by the relevant users (those who need to be mapped)
  • using the iterator QuerySet method to manage memory use
  • combining all of these changes into a reversion so that this change shows in the object's history
    Fixes is in scare quotes because I'm not 100% sure what the original issue was, but given the length of time the previous version had to run, I suspect something failed halfway through and because they were not contained in a transaction (as they now will be with the "reversion") the halfway-done mapping was not rolled back.

Adds the `map_cantus_ids" command which can be used to bulk-change one Cantus ID to another. As noted in the command docstring, this is a potentially temporary command that is (at this point) only going to be used for #1661, since this functionality should be taken care of by a functioning Cantus ID merge process.

#1661 should be closed once this is run on production with the appropriate Cantus ID arguments.

#1165 and #1657 should be closed once this is run in production.

@dchiller dchiller merged commit 8f70f12 into DDMAL:develop Oct 11, 2024
1 check passed
@dchiller dchiller deleted the i1661-cantus-id-mapping branch October 11, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants