Skip to content

Commit

Permalink
levels touch is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
talgat committed Oct 25, 2023
1 parent 16ee0c9 commit 5517fff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tarn/location/levels.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Level(NamedTuple):
location: Location
write: bool = True
replicate: bool = True
touch: bool = True
name: Optional[str] = None


Expand Down Expand Up @@ -43,7 +44,7 @@ def read(self, key: Key, return_labels: bool) -> ContextManager[Union[None, Valu
yield value_copy, labels_copy
else:
yield value_copy
else:
elif config.touch:
config.location.touch(key)
if not read:
yield None
Expand Down

0 comments on commit 5517fff

Please sign in to comment.