Skip to content
Snippets Groups Projects

Delivery rework

Merged Daniel Lyons requested to merge delivery-rework into main
7 unresolved threads
4 files
+ 29
9
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -32,6 +32,11 @@ class ChecksumDecorator(DestinationDecorator):
@staticmethod
def hash_file(file: pathlib.Path):
"""
Hash the supplied file
:param file: file to hash
:return: string in SHA1SUMS format (hexdigest)
"""
# You would expect performance to be worse than calling a C program here, but in my own testing I found
# that the ensuing block is somewhat *faster* than calling "shasum" directly. I was able to hash a 1 GB
# random file in 1.2 seconds with the following code, versus 1.8 seconds with shasum. This is across about 10
Loading