diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-29 14:34:02 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-29 14:34:02 -0800 |
commit | c32154f2875a7fb9aac727013e1475cdd811e180 (patch) | |
tree | f0e061498a101fa824995fb6ec9f91e7e44257e1 /extra/bulk_edits/2021-11-24_file_sha1_dedupe.md | |
parent | c5ea2dba358624f4c14da0a1a988ae14d0edfd59 (diff) | |
download | fatcat-c32154f2875a7fb9aac727013e1475cdd811e180.tar.gz fatcat-c32154f2875a7fb9aac727013e1475cdd811e180.zip |
move notes/bulk_edits/ to extra/bulk_edits/
Diffstat (limited to 'extra/bulk_edits/2021-11-24_file_sha1_dedupe.md')
-rw-r--r-- | extra/bulk_edits/2021-11-24_file_sha1_dedupe.md | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/extra/bulk_edits/2021-11-24_file_sha1_dedupe.md b/extra/bulk_edits/2021-11-24_file_sha1_dedupe.md new file mode 100644 index 00000000..012bcf62 --- /dev/null +++ b/extra/bulk_edits/2021-11-24_file_sha1_dedupe.md @@ -0,0 +1,35 @@ + +See notes and scripts about `file_sha1_dedupe` cleanup for prep details. + +## Prod Run + +Run as `cleanup-bot`: + + export FATCAT_AUTH_API_TOKEN=[...] + + git log | head -n1 + # commit 5bc5eeed5e3ba54c2129c4233b881291c5fa7449 + +First do a sample in dry-run mode: + + head -n25 /srv/fatcat/datasets/file_sha1_dupes.json \ + | python -m fatcat_tools.mergers.files --editgroup-description-override "Automated merging of file entities with duplicate SHA-1 hashes" --dry-run merge-files - + # Counter({'updated-entities': 59, 'lines': 25, 'merged': 25, 'skip': 0, 'updated-total': 0}) + +Gah, the dry-run mode still creates (empty) editgroups: + + https://fatcat.wiki/editgroup/iqzjg3vxu5elvotknmmjln3gv4 + https://fatcat.wiki/editgroup/2mxsl7lxo5dezem42whnr7zxxe + +Actually run (merge) the sample: + + head -n25 /srv/fatcat/datasets/file_sha1_dupes.json \ + | python -m fatcat_tools.mergers.files --editgroup-description-override "Automated merging of file entities with duplicate SHA-1 hashes" merge-files - + # Counter({'updated-entities': 59, 'lines': 25, 'merged': 25, 'skip': 0, 'updated-total': 0}) + + +Run the full batch: + + cat /srv/fatcat/datasets/file_sha1_dupes.json \ + | python -m fatcat_tools.mergers.files --editgroup-description-override "Automated merging of file entities with duplicate SHA-1 hashes" merge-files - + # Counter({'updated-entities': 6197, 'lines': 2039, 'merged': 2014, 'skip': 25, 'skip-not-active-entity': 25, 'updated-total': 0}) |