Skip to content

Commit

Permalink
Merge pull request #8394 from ThomasWaldmann/list-refresh-lock-freque…
Browse files Browse the repository at this point in the history
…ntly

repository.list: refresh lock more frequently
  • Loading branch information
ThomasWaldmann authored Sep 19, 2024
2 parents 97d1e18 + 2a20ebe commit 11b72ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/borg/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ def list(self, limit=None, marker=None):
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:
Expand Down

0 comments on commit 11b72ef

Please sign in to comment.