Closed bb233 closed 5 years ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
lib/archival_storage_ingest/workers/fixity_worker.rb | 32 | 35 | 91.43% | ||
<!-- | Total: | 34 | 37 | 91.89% | --> |
Totals | |
---|---|
Change from base Build 67: | -0.3% |
Covered Lines: | 826 |
Relevant Lines: | 898 |
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
lib/archival_storage_ingest/workers/fixity_worker.rb | 32 | 35 | 91.43% | ||
<!-- | Total: | 34 | 37 | 91.89% | --> |
Totals | |
---|---|
Change from base Build 67: | -0.3% |
Covered Lines: | 826 |
Relevant Lines: | 898 |
I have refactored the fixity workers to make the code between the S3 and SFS workers exist in a common class, and only S3/SFS-specific details are implemented in the individual classes.
To implement a new fixity worker type, you just need to implement the three methods:
worker_type
, which returns the manifest-type specific suffix (S3, SFS, Ingest) used in the manifest file name,object_key_paths(msg)
, which returns a hash of object keys and paths to be included in the manifestcalculate_checksum(path)
, which calculates the SHA1 hexdigest for a path.