buda-base / drs-deposit

Harvard DRS Deposit base
1 stars 0 forks source link

exception report for unknown files #31

Open jimk-bdrc opened 6 years ago

jimk-bdrc commented 6 years ago

Currently, the process blacklists a set of excluded file types from being copied into the batch template folder. This introduces risks because the code is always discovering different kinds of files in the sources.

To prevent this, change the processing to whitelist only certain kinds of files. (This include list is specific to PDS Object creation).

Further, when unknown files are encountered, flag the batch as needing examination. Go ahead and create it anyway, but don't queue it for upload until the exam has been finished.

DO NOT REPLACE OR DELETE ANYTHING ON THE FLY IN CODE

jimk-bdrc commented 6 years ago

pseudo code:

In make-drs-batch.sh:
For each file in the image directory
            If it’s not an approved file type
            Create a warning >> bb-console.txt
            Else
            Copy it
End

Build the batch

Save away this batch’s log files 
Examine the logs for errors (using my new ErrorFilter module)

If there’s a warning on this batch (for whatever reason)
    Flag the batch as “needing review”  (don’t exit,  Keep processing works in the worksList)