Created
July 22, 2019 16:29
-
-
Save camallen/ca697d8d80002a8d99f7c6a7f4bd48c3 to your computer and use it in GitHub Desktop.
Empty all the PII classification task annotation data from the WAMBO project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://www.zooniverse.org/admin/project_status/h-spiers/where-are-my-body-organs | |
| # https://www.zooniverse.org/lab/ | |
| wambo_project_id = 5372 | |
| wambo_classifications_scope = Classification.where(project_id: wambo_project_id).select(:id) | |
| wambo_classifications_scope.find_in_batches do |classifications| | |
| classifications_update_scope = Classification.where(id: classifications) | |
| # overwrite the submitted task annotations for all workflows | |
| # this will most likley break dumps in API and that's ok. | |
| # we've shipped the data safely | |
| # and folks asking for new data should not be allowed to get it | |
| # errors in the API are nice to flag this :) | |
| classifications_update_scope.update_all(annotations: []) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment