Merge pull request #8394 from ThomasWaldmann/list-refresh-lock-frequently

repository.list: refresh lock more frequently
This commit is contained in:
TW 2024-09-19 12:19:29 +02:00 committed by GitHub
commit 11b72efffe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -336,11 +336,11 @@ class Repository:
list <limit> infos starting from after id <marker>.
each info is a tuple (id, storage_size).
"""
self._lock_refresh()
collect = True if marker is None else False
result = []
infos = self.store.list("data") # generator yielding ItemInfos
while True:
self._lock_refresh()
try:
info = next(infos)
except StoreObjectNotFound: