mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-29 11:16:43 +00:00
RemoteReposity: prefetch can only be 'get'.
This commit is contained in:
parent
1030660e71
commit
e9605d67ad
1 changed files with 2 additions and 1 deletions
|
@ -424,6 +424,7 @@ def handle_error(error, res):
|
||||||
while not self.to_send and (calls or self.preload_ids) and len(waiting_for) < MAX_INFLIGHT:
|
while not self.to_send and (calls or self.preload_ids) and len(waiting_for) < MAX_INFLIGHT:
|
||||||
if calls:
|
if calls:
|
||||||
if is_preloaded:
|
if is_preloaded:
|
||||||
|
assert cmd == "get", "is_preload is only supported for 'get'"
|
||||||
if calls[0] in self.cache:
|
if calls[0] in self.cache:
|
||||||
waiting_for.append(fetch_from_cache(calls.pop(0)))
|
waiting_for.append(fetch_from_cache(calls.pop(0)))
|
||||||
else:
|
else:
|
||||||
|
@ -438,7 +439,7 @@ def handle_error(error, res):
|
||||||
args = (self.preload_ids.pop(0),)
|
args = (self.preload_ids.pop(0),)
|
||||||
self.msgid += 1
|
self.msgid += 1
|
||||||
self.cache.setdefault(args, []).append(self.msgid)
|
self.cache.setdefault(args, []).append(self.msgid)
|
||||||
self.to_send = msgpack.packb((1, self.msgid, cmd, args))
|
self.to_send = msgpack.packb((1, self.msgid, 'get', args))
|
||||||
|
|
||||||
if self.to_send:
|
if self.to_send:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue