Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

Commit 4326655

Browse files
authored
Merge pull request #22 from CSCfi/bugfix/skip-uploaded-chunks
ensure skipping chunks that are already uploaded
2 parents 2fd631c + 18d6455 commit 4326655

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

swift_upload_runner/upload.py

+3
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ async def generate_from_queue(self) -> typing.AsyncGenerator:
256256
while len(self.done_chunks) < self.total_chunks:
257257
chunk_number, segment = await self.q.get()
258258

259+
if chunk_number in self.done_chunks:
260+
continue
261+
259262
LOGGER.debug(f"Got chunk from chunk {chunk_number}")
260263

261264
chunk_reader = segment["data"]

0 commit comments

Comments
 (0)