Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions esgpull/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from esgpull.config import Config
from esgpull.download import DownloadCtx, Simple
from esgpull.exceptions import DownloadSizeError
from esgpull.fs import Digest, Filesystem
from esgpull.fs import Digest, FileCheck, Filesystem
from esgpull.models import File
from esgpull.result import Err, Ok, Result
from esgpull.tui import logger
Expand Down Expand Up @@ -152,10 +152,7 @@ def __init__(
self.tasks.append(task)

def should_download(self, file: File) -> bool:
if self.fs[file].drs.is_file():
return False
else:
return True
return self.fs.check(file) not in {FileCheck.Ok, FileCheck.Done}

async def process(self) -> AsyncIterator[Result]:
semaphore = asyncio.Semaphore(self.config.download.max_concurrent)
Expand Down
Loading