Skip to content

Commit

Permalink
added debug logging statement to hash_single
Browse files Browse the repository at this point in the history
  • Loading branch information
tclose committed Sep 1, 2023
1 parent 5486bc5 commit 731177a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pydra/utils/hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from collections.abc import Mapping
from functools import singledispatch
from hashlib import blake2b
import logging

# from pathlib import Path
from typing import (
Expand All @@ -18,6 +19,8 @@
)
import attrs.exceptions

logger = logging.getLogger("pydra")

try:
from typing import Protocol
except ImportError:
Expand Down Expand Up @@ -88,7 +91,8 @@ def hash_single(obj: object, cache: Cache) -> Hash:
h = blake2b(digest_size=16, person=b"pydra-hash")
for chunk in bytes_repr(obj, cache):
h.update(chunk)
cache[objid] = Hash(h.digest())
hsh = cache[objid] = Hash(h.digest())
logger.debug("Hash of %s object is %s", obj, hsh)
return cache[objid]


Expand Down

0 comments on commit 731177a

Please sign in to comment.