uoregon-libraries / oregonnews

!!Defunct!! University of Oregon fork of Chronicling America
1 stars 0 forks source link

Fix dry-run when purging #24

Closed jechols closed 9 years ago

jechols commented 9 years ago

Since the purge code "simplifies" the rest of the script's logic by deleting symlinks and a directory, a dry run ends up getting errors in the destination directory/symlink check. These aren't legitimate errors since a non-dry-run will actually go through just fine after the offending items are removed.

So... I think the fix is to do purging properly - skip the directory/symlink checks, and move the delete operation to where it fits in the sequence rather that doing it first in the hopes of avoiding excessive "if" blocks.

jechols commented 9 years ago

Fixed as a by-product of fixing the ingest script to purge separately from ingest